Смекни!
smekni.com

Разработка и патентная защита программного средства Автоматизированное рабочее место инженера п (стр. 4 из 4)

DataModule2->IBStoredProc3->Prepare();

DataModule2->IBStoredProc3->ExecProc();

DataModule2->IBTransaction1->Commit();

DataModule2->IBTable1->Active=false;

DataModule2->IBTable1->Active=true;

DataModule2->IBTable2->Active=true;

DataModule2->IBTable3->Active=true;

DataModule2->IBTable4->Active=true;

DataModule2->IBTable5->Active=true;

}

//---------------------------------------------------------------------------

void __fastcall TForm1::Edit7Change(TObject *Sender)

{

if (RadioButton1->Checked)

{TLocateOptions LO;

DataModule2->IBTable1->Locate("FIO_CL", Edit7->Text, LO<<loPartialKey<< loCaseInsensitive);}

else if (RadioButton2->Checked)

{TLocateOptions LO;

DataModule2->IBTable1->Locate("ADRES", Edit7->Text, LO<<loPartialKey<< loCaseInsensitive);}

else if (RadioButton3->Checked)

{TLocateOptions LO;

DataModule2->IBTable1->Locate("TELEPHONE", Edit7->Text, LO<<loPartialKey<< loCaseInsensitive);}

}

//---------------------------------------------------------------------------

void __fastcall TForm1::RadioButton4Click(TObject *Sender)

{

DataModule2->IBTable1->Active=false;

DataModule2->IBTable1->IndexFieldNames="FIO_CL";

DataModule2->IBTable1->Active=true;

}

//---------------------------------------------------------------------------

void __fastcall TForm1::RadioButton5Click(TObject *Sender)

{

DataModule2->IBTable1->Active=false;

DataModule2->IBTable1->IndexFieldNames="ADRES";

DataModule2->IBTable1->Active=true;

}

//---------------------------------------------------------------------------

void __fastcall TForm1::RadioButton6Click(TObject *Sender)

{

DataModule2->IBTable1->Active=false;

DataModule2->IBTable1->IndexFieldNames="ID_CLIENT";

DataModule2->IBTable1->Active=true;

}

//---------------------------------------------------------------------------

void __fastcall TForm1::Button4Click(TObject *Sender)

{

DataModule2->IBStoredProc4->ParamByName("DATE_PR")->AsString=Form1->Edit9->Text;

DataModule2->IBStoredProc4->ParamByName("ID_CLIENT")->AsString=Form1->Edit10->Text;

DataModule2->IBStoredProc4->ParamByName("ID_ING")->AsString=Form1->Edit11->Text;

DataModule2->IBStoredProc4->ParamByName("ID_DET")->AsString=Form1->Edit12->Text;

DataModule2->IBStoredProc4->ParamByName("ID_RASCH")->AsString=Form1->Edit13->Text;

DataModule2->IBStoredProc4->ParamByName("DATE_V")->AsString=Form1->Edit14->Text;

DataModule2->IBStoredProc4->ParamByName("STOIMOST")->AsString=Form1->Edit15->Text;

DataModule2->IBStoredProc4->Prepare();

DataModule2->IBStoredProc4->ExecProc();

DataModule2->IBTransaction1->Commit();

DataModule2->IBTable2->Active=false;

DataModule2->IBTable2->Active=true;

DataModule2->IBTable1->Active=true;

DataModule2->IBTable3->Active=true;

DataModule2->IBTable4->Active=true;

DataModule2->IBTable5->Active=true;

}

//---------------------------------------------------------------------------

void __fastcall TForm1::Edit22Change(TObject *Sender)

{

if (RadioButton8->Checked)

{TLocateOptions LO;

DataModule2->IBTable2->Locate("ID_CLIENT", Edit22->Text, LO<<loPartialKey<< loCaseInsensitive);}

else if (RadioButton9->Checked)

{TLocateOptions LO;

DataModule2->IBTable2->Locate("ID_ING", Edit22->Text, LO<<loPartialKey<< loCaseInsensitive);}

}

//---------------------------------------------------------------------------

void __fastcall TForm1::Button6Click(TObject *Sender)

{

DataModule2->IBStoredProc5->ParamByName("ID_CLIENT")->AsString=Form1->Edit9->Text;

DataModule2->IBStoredProc5->ParamByName("ID_ING")->AsString=Form1->Edit10->Text;

DataModule2->IBStoredProc5->ParamByName("ID_DET")->AsString=Form1->Edit11->Text;

DataModule2->IBStoredProc5->ParamByName("STOIMOST")->AsString=Form1->Edit12->Text;

DataModule2->IBStoredProc5->ParamByName("ID_RASCH")->AsString=Form1->Edit13->Text;

DataModule2->IBStoredProc5->ParamByName("DATE_PR")->AsString=Form1->Edit14->Text;

DataModule2->IBStoredProc5->ParamByName("DATE_V")->AsString=Form1->Edit15->Text;

DataModule2->IBStoredProc5->Prepare();

DataModule2->IBStoredProc5->ExecProc();

DataModule2->IBTransaction1->Commit();

DataModule2->IBTable1->Active=false;

DataModule2->IBTable1->Active=true;

DataModule2->IBTable2->Active=true;

DataModule2->IBTable3->Active=true;

DataModule2->IBTable4->Active=true;

DataModule2->IBTable5->Active=true;

}

//---------------------------------------------------------------------------

void __fastcall TForm1::Button7Click(TObject *Sender)

{

DataModule2->IBStoredProc7->ParamByName("NAME_DETAIL")->AsString=Edit23->Text;

DataModule2->IBStoredProc7->ParamByName("TECH_HAR")->AsString=Edit24->Text;

DataModule2->IBStoredProc7->ParamByName("PROIZVOD")->AsString=Edit25->Text;

DataModule2->IBStoredProc7->Prepare();

DataModule2->IBStoredProc7->ExecProc();

DataModule2->IBTransaction1->Commit();

DataModule2->IBTable1->Active=true;

DataModule2->IBTable2->Active=true;

DataModule2->IBTable3->Active=true;

DataModule2->IBTable4->Active=true;

DataModule2->IBTable5->Active=true;

}

//---------------------------------------------------------------------------

void __fastcall TForm1::Button5Click(TObject *Sender)

{

DataModule2->IBStoredProc6->ParamByName("ID_ZAK")->AsString=DBEdit2->Text;

DataModule2->IBStoredProc6->Prepare();

DataModule2->IBStoredProc6->ExecProc();

DataModule2->IBTransaction1->Commit();

DataModule2->IBTable1->Active=false;

DataModule2->IBTable1->Active=true;

DataModule2->IBTable2->Active=true;

DataModule2->IBTable3->Active=true;

DataModule2->IBTable4->Active=true;

DataModule2->IBTable5->Active=true;

}

//---------------------------------------------------------------------------

void __fastcall TForm1::Button8Click(TObject *Sender)

{

DataModule2->IBStoredProc6->ParamByName("ID_ING")->AsString=DBEdit3->Text;

DataModule2->IBStoredProc8->ParamByName("FIO_ING")->AsString=Edit27->Text;

DataModule2->IBStoredProc8->ParamByName("TELEPHONE")->AsString=Edit28->Text;

DataModule2->IBStoredProc8->ParamByName("ADRES")->AsString=Edit29->Text;

DataModule2->IBStoredProc8->Prepare();

DataModule2->IBStoredProc8->ExecProc();

DataModule2->IBTransaction1->Commit();

}

//---------------------------------------------------------------------------

void __fastcall TForm1::Button9Click(TObject *Sender)

{

DataModule2->IBStoredProc9->ParamByName("ID_ING")->AsString=DBEdit3->Text;

DataModule2->IBStoredProc9->Prepare();

DataModule2->IBStoredProc9->ExecProc();

DataModule2->IBTransaction1->Commit();

DataModule2->IBTable4->Active=false;

DataModule2->IBTable4->Active=true;

}

//---------------------------------------------------------------------------

void __fastcall TForm1::Button11Click(TObject *Sender)

{

Form3->QuickRep1->Preview();

Form3->Visible=false;

}

//---------------------------------------------------------------------------

void __fastcall TForm1::Button10Click(TObject *Sender)

{

Form4->Show();

}

//---------------------------------------------------------------------------

void __fastcall TForm1::Button12Click(TObject *Sender)

{

Close();

}

//---------------------------------------------------------------------------

void __fastcall TForm1::Button13Click(TObject *Sender)

{

DataModule2->IBStoredProc10->ParamByName("ID_DETAIL")->AsString=Edit30->Text;

DataModule2->IBStoredProc10->Prepare();

DataModule2->IBStoredProc10->ExecProc();

DataModule2->IBTransaction1->Commit();

DataModule2->IBTable3->Active=false;

DataModule2->IBTable3->Active=true;

}

//---------------------------------------------------------------------------

void __fastcall TForm1::RadioButton14Click(TObject *Sender)

{

DataModule2->IBTable3->Active=false;

DataModule2->IBTable3->IndexFieldNames="NAME_DETAIL";

DataModule2->IBTable3->Active=true;

}

//---------------------------------------------------------------------------

void __fastcall TForm1::RadioButton15Click(TObject *Sender)

{

DataModule2->IBTable3->Active=false;

DataModule2->IBTable3->IndexFieldNames="ID_DETAIL";

DataModule2->IBTable3->Active=true;

}

//---------------------------------------------------------------------------

void __fastcall TForm1::RadioButton16Click(TObject *Sender)

{

DataModule2->IBTable3->Active=false;

DataModule2->IBTable3->IndexFieldNames="PROIZVOD";

DataModule2->IBTable3->Active=true;

}

//---------------------------------------------------------------------------