Автоматизированное рабочее место производственно-технического отдела

Дипломная работа - Компьютеры, программирование

Другие дипломы по предмету Компьютеры, программирование

. h>

#pragma hdrstop

#include "Unit1. h"

#include "Unit4. h"

#include "Unit6. h"

#include "Unit10. h"

#include "Unit11. h"

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

#pragma package (smart_init)

#pragma link "sButton"

#pragma link "sPanel"

#pragma link "sStatusBar"

#pragma link "sPageControl"

#pragma link "sLabel"

#pragma link "sGroupBox"

#pragma link "acDBGrid"

#pragma link "sCustomComboEdit"

#pragma link "sMaskEdit"

#pragma link "sTooledit"

#pragma link "sCheckBox"

#pragma link "sEdit"

#pragma resource "*. dfm"*Form6;

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

__fastcall TForm6:: TForm6 (TComponent* Owner)

: TForm (Owner)

{

}

// ---------------------------------------------------------------------------__fastcall TForm6:: sButton6Click (TObject *Sender)

{->Close ();->Show ();

}

// ---------------------------------------------------------------------------__fastcall TForm6:: sButton2Click (TObject *Sender)

{->Visible=true;->Visible=false;

}

// ---------------------------------------------------------------------------__fastcall TForm6:: sDateEdit1Change (TObject *Sender)

{->MaxDate=sDateEdit2->Date;->ADOQuery12->Active=false;->ADOQuery12->SQL->Clear ();->ADOQuery12->SQL->Add ("select * from obj Where new_stroj Between: datastart and: datastop ");->ADOQuery12->Parameters->ParamByName ("datastart") - >Value=FormatDateTime ("dd. mm. yyyy",sDateEdit1->Date);->ADOQuery12->Parameters->ParamByName ("datastop") - >Value =FormatDateTime ("dd. mm. yyyy",sDateEdit2->Date);->ADOQuery12->Active=true;

}

// ---------------------------------------------------------------------------__fastcall TForm6:: sDateEdit2Change (TObject *Sender)

{->MinDate=sDateEdit1->Date;->ADOQuery12->Active=false;->ADOQuery12->SQL->Clear ();->ADOQuery12->SQL->Add ("select * from obj Where close_stoj Between: datastart and: datastop ");->ADOQuery12->Parameters->ParamByName ("datastart") - >Value=FormatDateTime ("dd. mm. yyyy",sDateEdit1->Date);->ADOQuery12->Parameters->ParamByName ("datastop") - >Value = FormatDateTime ("dd. mm. yyyy",sDateEdit2->Date);->ADOQuery12->Active=true;

}

// ---------------------------------------------------------------------------__fastcall TForm6:: sButton7Click (TObject *Sender)

{->ADOQuery12->Active=false;->ADOQuery12->SQL->Clear ();->ADOQuery12->SQL->Add ("select * from obj");->ADOQuery12->Active=true;

}

// ---------------------------------------------------------------------------__fastcall TForm6:: sCheckBox3Click (TObject *Sender)

{(sCheckBox3->Checked==true) {->Text="";->Text="";->ADOQuery12->Active=false;->ADOQuery12->SQL->Clear ();->ADOQuery12->SQL->Add ("select * from obj");->ADOQuery12->Active=true;->Checked=false;->Visible=true;->Visible=true;->Visible=true; }{->ADOQuery12->Active=false;->ADOQuery12->SQL->Clear ();->ADOQuery12->SQL->Add ("select * from obj");->ADOQuery12->Active=true;->Visible=false;->Visible=false;->Visible=false; }

}

// ---------------------------------------------------------------------------__fastcall TForm6:: sCheckBox4Click (TObject *Sender)

{(sCheckBox4->Checked==true) {->ADOQuery12->Active=false;->ADOQuery12->SQL->Clear ();->ADOQuery12->SQL->Add ("select * from obj");->ADOQuery12->Active=true;->Checked=false;->Visible=true;->Visible=true;->Visible=true;->Visible=true;->Visible=true; }{->ADOQuery12->Active=false;->ADOQuery12->SQL->Clear ();->ADOQuery12->SQL->Add ("select * from obj");->ADOQuery12->Active=true;->Visible=false;->Visible=false;->Visible=false;->Visible=false;->Visible=false; }

}

// ---------------------------------------------------------------------------__fastcall TForm6:: sButton8Click (TObject *Sender)

{(sDateEdit1->Text=="" || sDateEdit2->Text=="") {Application->MessageBoxA ("Заполнены не все поля, вывод отчёта не возможен!","Формирование отчёта. ",16); }{->QRLabel2->Caption=sEdit1->Text;->QRLabel5->Caption=sEdit2->Text+" "+sEdit3->Text;(sCheckBox3->Checked==true) {Form11->QRLabel8->Caption="строительству";->QRLabel9->Caption="";->QRLabel10->Caption="";->QRLabel12->Caption="";->QRLabel13->Caption=""; }(sCheckBox4->Checked==true) {Form11->QRLabel8->Caption="дате";->QRLabel9->Caption="с";->QRLabel10->Caption=sDateEdit1->Date;->QRLabel12->Caption="по";->QRLabel13->Caption=sDateEdit1->Date; }->QuickRep1->Preview (); }

}

// ---------------------------------------------------------------------------__fastcall TForm6:: sCheckBox1Click (TObject *Sender)

{(sCheckBox1->Checked==true) {->Checked=false;->Text="Действующее строительство"; }{->Text=""; }

}

// ---------------------------------------------------------------------------__fastcall TForm6:: sCheckBox2Click (TObject *Sender)

{(sCheckBox2->Checked==true) {->Checked=false;->Text="Строительство прекращено"; }{->Text=""; }

}

// ---------------------------------------------------------------------------__fastcall TForm6:: sEdit4Change (TObject *Sender)

{->ADOQuery12->Active=false;->ADOQuery12->SQL->Clear ();->ADOQuery12->SQL->Add ("select * from obj where tip_stoj LIKE %"+sEdit4->Text+"%; ");->ADOQuery12->Active=true;

}

// ---------------------------------------------------------------------------__fastcall TForm6:: sEdit5Change (TObject *Sender)

{->ADOQuery12->Active=false;->ADOQuery12->SQL->Clear ();->ADOQuery12->SQL->Add ("select * from obj where tip_stoj LIKE %"+sEdit5->Text+"%; ");->ADOQuery12->Active=true;

}

// ---------------------------------------------------------------------------__fastcall TForm6:: sButton5Click (TObject *Sender)

{->Visible=false;->Visible=true;->ADOQuery12->Active=false;->ADOQuery12->SQL->Clear ();->ADOQuery12->SQL->Add ("select * from obj");->ADOQuery12->Active=true;

}

// ---------------------------------------------------------------------------__fastcall TForm6:: FormKeyDown (TObject *Sender, WORD &Key,Shift)

{(Key==VK_ESCAPE) {sButton6Click (sButton6); }

}

// ---------------------------------------------------------------------------__fastcall TForm6:: Timer1Timer (TObject *Sender)

{(sEdit7->Text! ="" && sEdit8->Text! ="" && sEdit6->Text! ="") {sButton1->Enabled=true; }{sButton1->Enabled=false; }

}

// ---------------------------------------------------------------------------__fastcall TForm6:: sButton1Click (TObject *Sender)

{a;->QRLabel2->Caption=sEdit6->Text;->QRLabel5->Caption=sEdit7->Text+" "+sEdit8->Text;(int i=0; DataModule4->ADOQuery14->RecordCount>i; i++) {=a+ (DataModule4->ADOQuery14->FieldValues ["Stoimoct"]);->ADOQuery14->Next (); }->QRLabel27->Caption=IntToStr (a) +" руб. ";->QuickRep1->Preview ();

}

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

 

Настройки/Сервис

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

#include

#pragma hdrstop

#include "Unit1. h"

#include "Unit2. h"

#include "Unit3. h"

#include "Unit4. h"

#include "Unit5. h"

#include "Unit6. h"

#include "Unit7. h"

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

#pragma package (smart_init)

#pragma link "sButton"

#pragma link "sPageControl"

#pragma link "sPanel"

#pragma link "sStatusBar"

#pragma link "sComboBox"

#pragma link "sGauge"

#pragma link "sGroupBox"

#pragma link "sCustomComboEdit"

#pragma link "sLabel"

#pragma link "sMaskEdit"

#pragma link "sTooledit"

#pragma link "acProgressBar"

#pragma link "sMemo"

#pragma resource "*. dfm"*Form7;

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

__fastcall TForm7:: TForm7 (TComponent