Exemplo n.º 1
0
//---------------------------------------------------------------------------
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;*/
}
Exemplo n.º 2
0
void __fastcall TFormReportUchebKartStud::FormDestroy(TObject *Sender)
{
    for (int i = 0; i < mas_ochenka.size(); i++)
        delete mas_ochenka[i];

    WCDisconnect();
}
Exemplo n.º 3
0
//---------------------------------------------------------------------------
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());
  }
}
Exemplo n.º 4
0
//---------------------------------------------------------------------------
void __fastcall TFormDLL::FormClose(TObject *Sender, TCloseAction &Action)
{
  WCDisconnect();
}
Exemplo n.º 5
0
//---------------------------------------------------------------------------
void __fastcall TFormReportBUCityMounth::FormDestroy(TObject *Sender)
{
  pFormSelDate->Free();
  WCDisconnect();
}
Exemplo n.º 6
0
//---------------------------------------------------------------------------
void __fastcall TFormReportForma3::FormDestroy(TObject *Sender)
{
  WCDisconnect();
}
Exemplo n.º 7
0
//---------------------------------------------------------------------------
void __fastcall TFormReportStudsCandRedDiplom::FormDestroy(TObject *Sender)
{
    pFormList->Free();
    WCDisconnect();
}
Exemplo n.º 8
0
//---------------------------------------------------------------------------
void __fastcall TFormReportDocZachislenie::FormDestroy(
      TObject *Sender)
{
  pFormList->Free();
  WCDisconnect();
}