Сделай Сам Свою Работу на 5

Программный код файла unit1.cpp

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

 

#include <vcl.h>

#pragma hdrstop

#pragma link "Unit2"

#pragma link "Unit3"

#pragma link "Unit4"

#pragma link "Unit5"

#include "Unit1.h"

#include "Unit2.h"

#include "Unit3.h"

#include "Unit4.h"

#include "Unit5.h"

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

#pragma package(smart_init)

#pragma link "QRMBCtrls"

#pragma resource "*.dfm"

TForm1 *Form1;

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

__fastcall TForm1::TForm1(TComponent* Owner)

: TForm(Owner)

{

}

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

void __fastcall TForm1::Edit1Change(TObject *Sender)

{

TLocateOptions Opts;

Opts << loPartialKey<<loCaseInsensitive;

 

Form1->ADOTable1->Locate( "клиент",Edit1->Text,Opts);

}

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

 

void __fastcall TForm1::Edit2Change(TObject *Sender)

{

TLocateOptions Opts;

Opts << loPartialKey<<loCaseInsensitive;

 

Form1->ADOTable2->Locate( "клиент",Edit2->Text,Opts);

}

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

void __fastcall TForm1::Label22Click(TObject *Sender)

{

AnsiString s;

s=ComboBox1->Text;

Form1->ADOTable1->IndexFieldNames="["+s+"]";

}

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

 

void __fastcall TForm1::Label23Click(TObject *Sender)

{

Form1->Close();

}

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

 

void __fastcall TForm1::Label24Click(TObject *Sender)

{

Form1->Visible=False;

Form3->Show();

}

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

 

void __fastcall TForm1::Label25Click(TObject *Sender)

{ if (Form1->ADOTable1->Modified)

Form1->ADOTable1->Post();

}

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

 

void __fastcall TForm1::Label26Click(TObject *Sender)

{

Form1->ADOTable1->Insert();

}

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

 

void __fastcall TForm1::Label27Click(TObject *Sender)

{

Form1->ADOTable1->Delete();

}

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

 

void __fastcall TForm1::Label28Click(TObject *Sender)

{

Form1->Close();

}

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

 

void __fastcall TForm1::Label29Click(TObject *Sender)

{

if (Form1->ADOTable2->Modified)

Form1->ADOTable2->Post();

}

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

 

void __fastcall TForm1::Label30Click(TObject *Sender)

{

Form1->ADOTable2->Insert();

}

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

 

void __fastcall TForm1::Label31Click(TObject *Sender)

{

Form1->ADOTable2->Delete();

}

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

 

void __fastcall TForm1::Label32Click(TObject *Sender)

{

QuickRep1->Print();

}

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



 

void __fastcall TForm1::Label33Click(TObject *Sender)

{

QuickRep1->Preview();

}

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

 

void __fastcall TForm1::Label34Click(TObject *Sender)

{

Form1->Close();

}

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

 

void __fastcall TForm1::Label35Click(TObject *Sender)

{

AnsiString s;

s=ComboBox2->Text;

Form1->ADOTable3->IndexFieldNames="["+s+"]";

}

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

 

void __fastcall TForm1::Label36Click(TObject *Sender)

{

Form1->Close();

}

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

 

void __fastcall TForm1::Label37Click(TObject *Sender)

{

Form1->Close();

}

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

 

Программный код файла unit1.h

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

 

#ifndef Unit1H

#define Unit1H

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

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

#include <ADODB.hpp>

#include <DB.hpp>

#include <DBCtrls.hpp>

#include <DBGrids.hpp>

#include <ExtCtrls.hpp>

#include <Grids.hpp>

#include <Mask.hpp>

#include <ComCtrls.hpp>

#include <QRCtrls.hpp>

#include <QuickRpt.hpp>

#include "QRMBCtrls.hpp"

#include <jpeg.hpp>

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

class TForm1 : public TForm

{

__published: // IDE-managed Components

TDataSource *DataSource1;

TADOConnection *ADOConnection1;

TADOTable *ADOTable1;

TDataSource *DataSource2;

TADOTable *ADOTable2;

TDataSource *DataSource3;

TADOTable *ADOTable3;

TDataSource *DataSource5;

TADOTable *ADOTable5;

TPageControl *PageControl1;

TTabSheet *TabSheet1;

TLabel *Label1;

TLabel *Label2;

TLabel *Label3;

TLabel *Label4;

TLabel *Label5;

TLabel *Label6;

TLabel *Label7;

TLabel *Label8;

TLabel *Label9;

TLabel *Label10;

TLabel *Label11;

TLabel *Label18;

TLabel *Label19;

TDBEdit *DBEdit1;

TDBEdit *DBEdit2;

TDBEdit *DBEdit3;

TDBEdit *DBEdit4;

TDBEdit *DBEdit5;

TDBEdit *DBEdit6;

TDBEdit *DBEdit7;

TDBEdit *DBEdit8;

TDBEdit *DBEdit9;

TDBEdit *DBEdit11;

TDBComboBox *DBComboBox1;

TDBGrid *DBGrid1;

TDBNavigator *DBNavigator1;

TComboBox *ComboBox1;

TEdit *Edit1;

TTabSheet *TabSheet2;

TLabel *Label12;

TLabel *Label13;

TLabel *Label14;

TLabel *Label15;

TLabel *Label16;

TLabel *Label17;

TLabel *Label20;

TDBGrid *DBGrid2;

TDBNavigator *DBNavigator2;

TDBEdit *DBEdit10;

TDBEdit *DBEdit12;

TDBEdit *DBEdit13;

TDBEdit *DBEdit14;

TDBEdit *DBEdit15;

TDBEdit *DBEdit16;

TEdit *Edit2;

TTabSheet *TabSheet3;

TLabel *Label21;

TDBGrid *DBGrid3;

TDBNavigator *DBNavigator3;

TComboBox *ComboBox2;

TTabSheet *TabSheet4;

TQuickRep *QuickRep1;

TQRBand *QRBand1;

TQRLabel *QRLabel1;

TQRBand *QRBand3;

TQRDBText *QRDBText1;

TQRDBText *QRDBText2;

TQRDBText *QRDBText9;

TQRDBText *QRDBText10;

TQRDBText *QRDBText11;

TQRDBText *QRDBText12;

TQRDBText *QRDBText13;

TQRLabel *QRLabel16;

TQRLabel *QRLabel2;

TQRLabel *QRLabel3;

TQRLabel *QRLabel4;

TQRLabel *QRLabel5;

TQRLabel *QRLabel6;

TQRLabel *QRLabel7;

TQRBand *QRBand5;

TQRLabel *QRLabel9;

TQRLabel *QRLabel10;

TQRLabel *QRLabel11;

TQRLabel *QRLabel12;

TQRLabel *QRLabel13;

TQRLabel *QRLabel14;

TTabSheet *TabSheet5;

TDBGrid *DBGrid4;

TDBNavigator *DBNavigator4;

TImage *Image1;

TLabel *Label22;

TLabel *Label23;

TLabel *Label24;

TLabel *Label25;

TLabel *Label26;

TLabel *Label27;

TImage *Image2;

TLabel *Label28;

TLabel *Label29;

TLabel *Label30;

TLabel *Label31;

TImage *Image3;

TImage *Image4;

TLabel *Label32;

TImage *Image5;

TLabel *Label33;

TImage *Image6;

TImage *Image7;

TImage *Image8;

TLabel *Label34;

TImage *Image9;

TLabel *Label35;

TImage *Image10;

TLabel *Label36;

TImage *Image11;

TLabel *Label37;

TLabel *Label38;

TDBEdit *DBEdit17;

void __fastcall Edit1Change(TObject *Sender);

void __fastcall Edit2Change(TObject *Sender);

void __fastcall Label22Click(TObject *Sender);

void __fastcall Label23Click(TObject *Sender);

void __fastcall Label24Click(TObject *Sender);

void __fastcall Label25Click(TObject *Sender);

void __fastcall Label26Click(TObject *Sender);

void __fastcall Label27Click(TObject *Sender);

void __fastcall Label28Click(TObject *Sender);

void __fastcall Label29Click(TObject *Sender);

void __fastcall Label30Click(TObject *Sender);

void __fastcall Label31Click(TObject *Sender);

void __fastcall Label32Click(TObject *Sender);

void __fastcall Label33Click(TObject *Sender);

void __fastcall Label34Click(TObject *Sender);

void __fastcall Label35Click(TObject *Sender);

void __fastcall Label36Click(TObject *Sender);

void __fastcall Label37Click(TObject *Sender);

private: // User declarations

public: // User declarations

__fastcall TForm1(TComponent* Owner);

};

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

extern PACKAGE TForm1 *Form1;

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

#endif

Приложение В

Программный код файла unit2.cpp

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

 

#include <vcl.h>

#pragma hdrstop

#pragma link "Unit1"

#pragma link "Unit3"

#pragma link "Unit4"

#pragma link "Unit5"

#include "Unit1.h"

#include "Unit2.h"

#include "Unit3.h"

#include "Unit4.h"

#include "Unit5.h"

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

#pragma package(smart_init)

#pragma resource "*.dfm"

TForm2 *Form2;

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

__fastcall TForm2::TForm2(TComponent* Owner)

: TForm(Owner)

{

}

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

void __fastcall TForm2::Edit1Change(TObject *Sender)

{

TLocateOptions Opts;

Opts << loPartialKey<<loCaseInsensitive;

 

Form2->ADOTable1->Locate( "код заказа",Edit1->Text,Opts);

}

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

 

void __fastcall TForm2::Edit2Change(TObject *Sender)

{

TLocateOptions Opts;

Opts << loPartialKey<<loCaseInsensitive;

 

Form2->ADOTable2->Locate( "код материала",Edit2->Text,Opts);

}

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

 

void __fastcall TForm2::Edit3Change(TObject *Sender)

{

TLocateOptions Opts;

Opts << loPartialKey<<loCaseInsensitive;

 

Form2->ADOTable2->Locate( "код сотрудника",Edit3->Text,Opts);

}

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

 

void __fastcall TForm2::Label27Click(TObject *Sender)

{

Form2->Close();

}

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

 

void __fastcall TForm2::Label28Click(TObject *Sender)

{

Form2->Visible=False;

Form3->Show();

}

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

 

void __fastcall TForm2::Label29Click(TObject *Sender)

{

if (Form2->ADOTable1->Modified)

Form2->ADOTable1->Post();

}

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

 

void __fastcall TForm2::Label30Click(TObject *Sender)

{

Form2->ADOTable1->Insert();

}

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

 

void __fastcall TForm2::Label31Click(TObject *Sender)

{

Form2->ADOTable1->Delete();

}

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

 

void __fastcall TForm2::Label32Click(TObject *Sender)

{

Form2->Close();

}

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

 

void __fastcall TForm2::Label33Click(TObject *Sender)

{

if (Form2->ADOTable2->Modified)

Form2->ADOTable2->Post();

}

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

 

void __fastcall TForm2::Label34Click(TObject *Sender)

{

Form2->ADOTable2->Insert();

}

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

 

void __fastcall TForm2::Label35Click(TObject *Sender)

{

Form2->ADOTable2->Delete();

}

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

 



©2015- 2019 stydopedia.ru Все материалы защищены законодательством РФ.