コード例 #1
0
ファイル: UnitFormDLL.cpp プロジェクト: txe/ieml
//---------------------------------------------------------------------------
void __fastcall TFormDLLProgr::LoadData(char* IniFileName,int _idstud)
{
  opts.SetFileName(AnsiString(IniFileName));
  BtnEditDiscip->Enabled=opts.ACCESSEditDisciplines;
  idstud=_idstud;

  AnsiString Msg="Неудачное подключение к "+opts.DBHost+" пользователя "+opts.DBLogin+"!";
  if (!WCConnect())
  {
    //MessageBox(Handle,Msg.c_str(),"Error",MB_OK);
    WCDisconnect();
  }
  else
  {
    AnsiString query="CREATE TABLE IF NOT EXISTS "+opts.DBDisciplines+" (id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, idspec INT NOT NULL, fulltitle TEXT NULL, shorttitle TEXT NULL, deleted BIT NOT NULL DEFAULT 0, num_hours INT NULL, idclass INT NOT NULL)";
    mysql_query(mysql,query.c_str());
    query="CREATE TABLE IF NOT EXISTS "+opts.DBProgress+" (id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, idstud INT NOT NULL, iddiscip INT NOT NULL, numplansemestr INT NOT NULL, numgraphsemestr INT NOT NULL, estimation INT NULL, ball FLOAT(4,2) NULL, deleted BIT NOT NULL DEFAULT 0)";
    mysql_query(mysql,query.c_str());
  }

  UpdateDisciplinesInfo();
  ComboBoxDiscip->ItemIndex=min(indexDiscipForEditOneGroup,ComboBoxDiscip->Items->Count-1);
  ComboBoxDiscipChange(ComboBoxDiscip);
  UpdateVKR();
  
/*  ComboBoxOcenka->ItemIndex=-1;
  ComboBoxBall->ItemIndex=-1;*/
}
コード例 #2
0
void __fastcall TFormReportUchebKartStud::FormDestroy(TObject *Sender)
{
    for (int i = 0; i < mas_ochenka.size(); i++)
        delete mas_ochenka[i];

    WCDisconnect();
}
コード例 #3
0
ファイル: UnitFormDLL.cpp プロジェクト: txe/ieml
//---------------------------------------------------------------------------
void __fastcall TFormDLL::LoadData(char* IniFileName,int _idstud)
{
  opts.SetFileName(AnsiString(IniFileName));
  BtnOptsOplata->Enabled=opts.ACCESSEditPayOpts;
  idstud=_idstud;
  CurIDOpts=ERROR_ID;
  if (CurIDOpts==ERROR_ID)
  {
    LabOpts->Caption="Категория оплаты не выбрана";

    LabGroup->Hide();
    LabDates->Hide();
    LabMoney->Hide();
    LabGroupVal->Hide();
    LabDatesVal->Hide();
    LabMoneyVal->Hide();
    GroupBoxOplata->Enabled=false;
    ComboBoxMoney->Clear();
    CommonMoneyForPeriod=-1;
    InitPrevOplata();
  }

  // Loading
  AnsiString Msg="Неудачное подключение к "+opts.DBHost+" пользователя "+opts.DBLogin+"!";
  if (!WCConnect())
  {
    MessageBox(Handle,Msg.c_str(),"Error",MB_OK);
    WCDisconnect();
  }
  else
  {
    AnsiString query="CREATE TABLE IF NOT EXISTS "+opts.DBPayOpts+" (id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, idgroup INT NOT NULL, datestart DATE NOT NULL, dateend DATE NOT NULL, commoncountmoney INT NOT NULL, deleted BIT NOT NULL DEFAULT 0)";
    mysql_query(mysql,query.c_str());
    query="CREATE TABLE IF NOT EXISTS "+opts.DBPayFacts+" (id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, idstud INT NOT NULL, datepay DATE NOT NULL, moneypay INT NOT NULL, idopts INT NOT NULL, deleted BIT NOT NULL DEFAULT 0)";
    mysql_query(mysql,query.c_str());
  }
}
コード例 #4
0
ファイル: UnitFormDLL.cpp プロジェクト: txe/ieml
//---------------------------------------------------------------------------
void __fastcall TFormDLL::FormClose(TObject *Sender, TCloseAction &Action)
{
  WCDisconnect();
}
コード例 #5
0
ファイル: UnitReportBUCityMounth.cpp プロジェクト: txe/ieml
//---------------------------------------------------------------------------
void __fastcall TFormReportBUCityMounth::FormDestroy(TObject *Sender)
{
  pFormSelDate->Free();
  WCDisconnect();
}
コード例 #6
0
ファイル: UnitReportForma3.cpp プロジェクト: txe/ieml
//---------------------------------------------------------------------------
void __fastcall TFormReportForma3::FormDestroy(TObject *Sender)
{
  WCDisconnect();
}
コード例 #7
0
//---------------------------------------------------------------------------
void __fastcall TFormReportStudsCandRedDiplom::FormDestroy(TObject *Sender)
{
    pFormList->Free();
    WCDisconnect();
}
コード例 #8
0
ファイル: UnitReportDocZachislenie.cpp プロジェクト: txe/ieml
//---------------------------------------------------------------------------
void __fastcall TFormReportDocZachislenie::FormDestroy(
      TObject *Sender)
{
  pFormList->Free();
  WCDisconnect();
}