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

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

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

 

#ifndef Unit2H

#define Unit2H

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

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

#include <ADODB.hpp>

#include <ComCtrls.hpp>

#include <DB.hpp>

#include <DBCtrls.hpp>

#include <DBGrids.hpp>

#include <ExtCtrls.hpp>

#include <Grids.hpp>

#include <Mask.hpp>

#include <jpeg.hpp>

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

class TForm2 : public TForm

{

__published: // IDE-managed Components

TPageControl *PageControl1;

TDataSource *DataSource1;

TADOConnection *ADOConnection2;

TADOTable *ADOTable1;

TDBGrid *DBGrid1;

TDBNavigator *DBNavigator1;

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 *Label12;

TLabel *Label13;

TLabel *Label14;

TLabel *Label15;

TLabel *Label16;

TLabel *Label17;

TLabel *Label18;

TLabel *Label19;

TDBEdit *DBEdit1;

TDBEdit *DBEdit2;

TDBEdit *DBEdit3;

TDBEdit *DBEdit4;

TDBEdit *DBEdit5;

TDBEdit *DBEdit6;

TDBEdit *DBEdit7;

TDBEdit *DBEdit8;

TDBEdit *DBEdit9;

TDBEdit *DBEdit10;

TDBEdit *DBEdit11;

TDBEdit *DBEdit12;

TDBEdit *DBEdit13;

TDBEdit *DBEdit14;

TDBEdit *DBEdit15;

TDBEdit *DBEdit16;

TDBEdit *DBEdit17;

TDBEdit *DBEdit18;

TDBEdit *DBEdit19;

TTabSheet *TabSheet2;

TADOTable *ADOTable2;

TDataSource *DataSource2;

TDBGrid *DBGrid2;

TLabel *Label20;

TLabel *Label21;

TLabel *Label22;

TLabel *Label23;

TDBCheckBox *DBCheckBox1;

TDBEdit *DBEdit20;

TDBEdit *DBEdit21;

TDBEdit *DBEdit22;

TDBNavigator *DBNavigator2;

TLabel *Label24;

TEdit *Edit1;

TLabel *Label25;

TEdit *Edit2;

TEdit *Edit3;

TLabel *Label26;

TImage *Image1;

TLabel *Label27;

TLabel *Label28;

TLabel *Label29;

TLabel *Label30;

TLabel *Label31;

TImage *Image2;

TLabel *Label32;

TLabel *Label33;

TLabel *Label34;

TLabel *Label35;

void __fastcall Edit1Change(TObject *Sender);

void __fastcall Edit2Change(TObject *Sender);

void __fastcall Edit3Change(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);

private: // User declarations

public: // User declarations

__fastcall TForm2(TComponent* Owner);

};

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

extern PACKAGE TForm2 *Form2;

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

#endif

Приложение С

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

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

 

#include <vcl.h>

#pragma hdrstop

#pragma link "Unit1"

#pragma link "Unit2"

#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"

TForm3 *Form3;

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

__fastcall TForm3::TForm3(TComponent* Owner)

: TForm(Owner)

{

}

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

 

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

void __fastcall TForm3::FormCreate(TObject *Sender)

{

Form1->Hide();

Form3->Show();

}

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

 

 

void __fastcall TForm3::Label3Click(TObject *Sender)

{

if ((Edit1->Text=="приемщик заказов")&&(Edit2->Text=="заказ")){

Form1->Visible=true;

Form3->Hide();

}else{

if ((Edit1->Text=="закройщик")&&(Edit2->Text=="закройщик")){

Form2->Visible=true;

Form3->Hide();

}else{

if ((Edit1->Text=="кладовщик")&&(Edit2->Text=="склад")){

Form4->Visible=true;

Form3->Hide();

}else{

if ((Edit1->Text=="начальник цеха")&&(Edit2->Text=="цех")){

Form5->Visible=true;

Form3->Hide();

}else{

ShowMessage("Вы ввели неверный логин или пароль");

}

}

}

}

}

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

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

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

 

#ifndef Unit3H

#define Unit3H

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

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

#include <ExtCtrls.hpp>

#include <jpeg.hpp>

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

class TForm3 : public TForm

{

__published: // IDE-managed Components

TEdit *Edit1;

TEdit *Edit2;

TLabel *Label1;

TLabel *Label2;

TImage *Image1;

TImage *Image2;

TLabel *Label3;

void __fastcall FormCreate(TObject *Sender);

void __fastcall Label3Click(TObject *Sender);

private: // User declarations

public: // User declarations

__fastcall TForm3(TComponent* Owner);

};

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

extern PACKAGE TForm3 *Form3;

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

#endif


 

Приложение D

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

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

 

#include <vcl.h>

#pragma hdrstop

#pragma link "Unit1"

#pragma link "Unit3"

#pragma link "Unit2"

#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"

TForm4 *Form4;

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

__fastcall TForm4::TForm4(TComponent* Owner)

: TForm(Owner)

{

}

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

void __fastcall TForm4::Edit1Change(TObject *Sender)

{

TLocateOptions Opts;

Opts << loPartialKey<<loCaseInsensitive;

 

Form4->ADOTable2->Locate( "наименование",Edit1->Text,Opts);

}

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

void __fastcall TForm4::Edit2Change(TObject *Sender)

{

TLocateOptions Opts;

Opts << loPartialKey<<loCaseInsensitive;

 

Form4->ADOTable3->Locate( "код заказа",Edit2->Text,Opts);

}

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

 

void __fastcall TForm4::Label18Click(TObject *Sender)

{

Form4->Close();

}

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

 

void __fastcall TForm4::Label19Click(TObject *Sender)

{

Form4->Visible=False;

Form3->Show();

}

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

 

void __fastcall TForm4::Label20Click(TObject *Sender)

{

if (Form4->ADOTable1->Modified)

Form4->ADOTable1->Post();

}

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

 

void __fastcall TForm4::Label21Click(TObject *Sender)

{

Form4->ADOTable1->Insert();

}

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

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

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

 

#ifndef Unit4H

#define Unit4H

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

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

#include <ADODB.hpp>

#include <ComCtrls.hpp>

#include <DB.hpp>

#include <DBCtrls.hpp>

#include <DBGrids.hpp>

#include <ExtCtrls.hpp>

#include <Grids.hpp>

#include <Mask.hpp>

#include <jpeg.hpp>

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

class TForm4 : public TForm

{

__published: // IDE-managed Components

TPageControl *PageControl1;

TTabSheet *TabSheet1;

TTabSheet *TabSheet2;

TADOTable *ADOTable1;

TADOConnection *ADOConnection1;

TDataSource *DataSource1;

TDBGrid *DBGrid1;

TDBNavigator *DBNavigator1;

TLabel *Label1;

TLabel *Label2;

TLabel *Label3;

TLabel *Label4;

TLabel *Label5;

TDBEdit *DBEdit1;

TDBEdit *DBEdit2;

TDBEdit *DBEdit3;

TDBEdit *DBEdit4;

TDBEdit *DBEdit5;

TDataSource *DataSource2;

TADOTable *ADOTable2;

TDBNavigator *DBNavigator2;

TDBGrid *DBGrid2;

TDBEdit *DBEdit6;

TDBEdit *DBEdit7;

TDBEdit *DBEdit8;

TLabel *Label6;

TLabel *Label7;

TLabel *Label8;

TTabSheet *TabSheet3;

TADOTable *ADOTable3;

TDataSource *DataSource3;

TDBGrid *DBGrid3;

TDBNavigator *DBNavigator3;

TDBEdit *DBEdit9;

TDBEdit *DBEdit10;

TDBEdit *DBEdit11;

TDBEdit *DBEdit12;

TDBEdit *DBEdit13;

TLabel *Label9;

TLabel *Label10;

TLabel *Label11;

TLabel *Label12;

TLabel *Label13;

TLabel *Label14;

TComboBox *ComboBox1;

TEdit *Edit1;

TLabel *Label15;

TComboBox *ComboBox2;

TLabel *Label16;

TLabel *Label17;

TEdit *Edit2;

TImage *Image1;

TLabel *Label18;

TLabel *Label19;

TLabel *Label20;

TLabel *Label21;

TLabel *Label22;

TLabel *Label23;

TImage *Image2;

TLabel *Label24;

TLabel *Label25;

TLabel *Label26;

TLabel *Label27;

TLabel *Label28;

TLabel *Label29;

TLabel *Label30;

TLabel *Label31;

TLabel *Label32;

TImage *Image3;

void __fastcall Edit1Change(TObject *Sender);

void __fastcall Edit2Change(TObject *Sender);

void __fastcall Label18Click(TObject *Sender);

void __fastcall Label19Click(TObject *Sender);

void __fastcall Label20Click(TObject *Sender);

void __fastcall Label21Click(TObject *Sender);

void __fastcall Label22Click(TObject *Sender);

void __fastcall Label23Click(TObject *Sender);

void __fastcall Label25Click(TObject *Sender);

void __fastcall Label26Click(TObject *Sender);

void __fastcall Label27Click(TObject *Sender);

void __fastcall Label29Click(TObject *Sender);

void __fastcall Label30Click(TObject *Sender);

void __fastcall Label31Click(TObject *Sender);

void __fastcall Label32Click(TObject *Sender);

private: // User declarations

public: // User declarations

__fastcall TForm4(TComponent* Owner);

};

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

extern PACKAGE TForm4 *Form4;

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

#endif


 

Приложение Е



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