}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button10Click(TObject *Sender)
{
UpdateComboBoxInventory();
Edit11->Text = "";
Edit12->Text = "";
Edit14->Text = "";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button15Click(TObject *Sender)
{
Edit15->Text= "";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button17Click(TObject *Sender)
{
Edit13->Text = "";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button19Click(TObject *Sender)
{
Edit16->Text = "";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N9Click(TObject *Sender)
{
this->GroupBox2->Visible=false;
this->GroupBox3->Visible=false;
this->GroupBox1->Visible=false;
this->GroupBox4->Visible=false;
this->GroupBox6->Visible=false;
this->GroupBox7->Visible=false;
this->GroupBox5->Visible=false;
this->GroupBox13->Visible=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N10Click(TObject *Sender)
{
this->GroupBox2->Visible=false;
this->GroupBox3->Visible=false;
this->GroupBox1->Visible=false;
this->GroupBox4->Visible=false;
this->GroupBox6->Visible=false;
this->GroupBox7->Visible=false;
this->GroupBox5->Visible=false;
this->GroupBox13->Visible=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N11Click(TObject *Sender)
{
this->GroupBox2->Visible=false;
this->GroupBox3->Visible=false;
this->GroupBox1->Visible=false;
this->GroupBox4->Visible=false;
this->GroupBox6->Visible=false;
this->GroupBox7->Visible=false;
this->GroupBox5->Visible=false;
this->GroupBox13->Visible=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Table1->Append();
Table1->FieldValues["id_name"] = ComboBox1->Text;
Table1->FieldValues["id_group"] = ComboBox2->Text;
Table1->FieldValues["id_packing"] = ComboBox3->Text;
Table1->FieldValues["id_ed_izm"] = ComboBox4->Text;
Table1->FieldValues["id_producer"] = ComboBox5->Text;
Table1->FieldValues["k_sh"] = Edit1->Text;*/
/* Table3->FieldValues["Date"] = Edit1->Text;
Table3->FieldValues["Sum"] = Edit3->Text;
Table3->FieldValues["ID_sklad"] = ComboBox1->Text;*/
// Table1->Post();
/*Table1->Active=false;
Table1->Active=true; */
/*Query1->Active=false;
Query1->Active=true;*/
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include "Unit2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
UpdateComboBox();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button1Click(TObject *Sender)
{
Form2->Close();
Form1->Enabled=true;
Form1->Show();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button2Click(TObject *Sender)
{
Form1->Table1->Append();
Form1->Table1->FieldValues["dn"] = Form2->DateTimePicker1->Date;
Form1->Table1->FieldValues["dk"] = Form2->DateTimePicker2->Date;
Form1->Table1->FieldValues["id_group"] = Form2->ComboBox1->ItemIndex+1;
Form1->Table1->FieldValues["id_packing"] = Form2->ComboBox2->ItemIndex+1;
Form1->Table1->Post();
Form1->GZ();
Form2->Close();
Form1->Enabled=true;
Form1->Show();
Form1->GroupBox6->Visible=true;
}
//---------------------------------------------------------------------------
void TForm2::UpdateComboBox()
{
ComboBox1->Clear();
ComboBox2->Clear();
Query1->Active = false;
Query1->Active = true;
TDataSet *dss = DataSource1->DataSet;
int length = dss->RecordCount;
AnsiString *str = new AnsiString[length];
int i = 0, j = 0;
for (dss->First();!dss->Eof; dss->Next())
str[i++] = DataSource1->DataSet->FieldByName("Group")->AsString;
for (j = 0; j < length; j++)
{
ComboBox1->Items->Add(str[j]);
}
Query2->Active = false;
Query2->Active = true;
TDataSet *dss1 = DataSource2->DataSet;
length = dss1->RecordCount;
AnsiString *str1 = new AnsiString[length];
i = 0;
for (dss1->First();!dss1->Eof; dss1->Next())
str1[i++] = DataSource2->DataSet->FieldByName("Packing")->AsString;
for (j = 0; j < length; j++)
{
ComboBox2->Items->Add(str1[j]);
}
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit3.h"
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm3 *Form3;
//---------------------------------------------------------------------------
__fastcall TForm3::TForm3(TComponent* Owner)
: TForm(Owner)
{
UpdateComboBox();
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button1Click(TObject *Sender)
{
Form3->Close();
Form1->Enabled=true;
Form1->Show();
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button2Click(TObject *Sender)
{
Form3->Close();
Form1->Enabled=true;
Form1->Show();
Form1->GroupBox7->Visible=true;
}
//---------------------------------------------------------------------------
void TForm3::UpdateComboBox()
{
ComboBox1->Clear();
ComboBox2->Clear();
Query1->Active = false;
Query1->Active = true;
TDataSet *dss = DataSource1->DataSet;
int length = dss->RecordCount;
AnsiString *str = new AnsiString[length];
int i = 0, j = 0;
for (dss->First();!dss->Eof; dss->Next())
str[i++] = DataSource1->DataSet->FieldByName("Group")->AsString;
for (j = 0; j < length; j++)
{
ComboBox1->Items->Add(str[j]);
}
Query2->Active = false;
Query2->Active = true;
TDataSet *dss1 = DataSource2->DataSet;
length = dss1->RecordCount;
AnsiString *str1 = new AnsiString[length];
i = 0;
for (dss1->First();!dss1->Eof; dss1->Next())
str1[i++] = DataSource2->DataSet->FieldByName("Zakazi")->AsString;
for (j = 0; j < length; j++)
{
ComboBox2->Items->Add(str1[j]);
}
}
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Menus.hpp>
#include <DB.hpp>
#include <DBCtrls.hpp>
#include <DBGrids.hpp>
#include <DBTables.hpp>
#include <ExtCtrls.hpp>
#include <Grids.hpp>
#include <Buttons.hpp>
#include <ComCtrls.hpp>
//---------------------------------------------------------------------------
class TForm1: public TForm
{
__published: // IDE-managed Components
TMainMenu *MainMenu1;
TMenuItem *N1;
TMenuItem *N2;
TMenuItem *N3;
TMenuItem *N4;
TMenuItem *N5;
TMenuItem *N6;
TMenuItem *N7;
TMenuItem *N8;
TMenuItem *N9;
TMenuItem *N10;
TMenuItem *N11;
TMenuItem *N12;
TMenuItem *ORZ1;
TMenuItem *ORZ2;
TGroupBox *GroupBox1;
TDataSource *DataSource1;
TDBGrid *DBGrid1;
TDBNavigator *DBNavigator1;
TQuery *Query1;
TDatabase *Database1;
TSpeedButton *SpeedButton1;
TGroupBox *GroupBox2;
TDBGrid *DBGrid2;
TDBNavigator *DBNavigator2;
TDataSource *DataSource2;
TQuery *Query2;
TGroupBox *GroupBox3;
TDBGrid *DBGrid3;
TDBNavigator *DBNavigator3;
TDataSource *DataSource3;
TQuery *Query3;
TGroupBox *GroupBox4;
TDBGrid *DBGrid4;
TDBNavigator *DBNavigator4;
TQuery *Query4;
TDataSource *DataSource4;
TGroupBox *GroupBox5;
TDBNavigator *DBNavigator5;
TDBGrid *DBGrid5;
TQuery *Query5;
TDataSource *DataSource5;
TGroupBox *GroupBox6;
TDataSource *DataSource6;
TDBGrid *DBGrid6;
TDBNavigator *DBNavigator6;
TQuery *Query6;
TGroupBox *GroupBox7;
TDataSource *DataSource7;
TDBGrid *DBGrid7;
TDBNavigator *DBNavigator7;
TQuery *Query7;
TGroupBox *GroupBox8;
TComboBox *ComboBox1;
TLabel *Label1;
TComboBox *ComboBox2;
TComboBox *ComboBox3;
TComboBox *ComboBox4;
TComboBox *ComboBox5;
TEdit *Edit1;
TLabel *Label2;
TLabel *Label3;
TEdit *Edit2;
TEdit *Edit3;
TEdit *Edit4;
TButton *Button1;
TButton *Button2;
TGroupBox *GroupBox9;
TLabel *Label4;
TComboBox *ComboBox6;
TButton *Button3;
TButton *Button4;
TComboBox *ComboBox7;
TDateTimePicker *DateTimePicker1;
TComboBox *ComboBox10;
TEdit *Edit5;
TEdit *Edit9;
TGroupBox *GroupBox10;
TLabel *Label5;
TComboBox *ComboBox8;
TButton *Button5;
TButton *Button6;
TComboBox *ComboBox9;
TDateTimePicker *DateTimePicker2;
TComboBox *ComboBox11;
TEdit *Edit6;
TEdit *Edit7;
TGroupBox *GroupBox11;
TLabel *Label6;
TComboBox *ComboBox12;
TButton *Button7;
TButton *Button8;
TComboBox *ComboBox13;
TDateTimePicker *DateTimePicker3;
TComboBox *ComboBox14;
TEdit *Edit8;
TEdit *Edit10;
TLabel *Label7;
TComboBox *ComboBox15;
TGroupBox *GroupBox12;
TLabel *Label8;
TComboBox *ComboBox16;
TButton *Button9;
TButton *Button10;
TComboBox *ComboBox17;
TDateTimePicker *DateTimePicker4;
TEdit *Edit11;
TEdit *Edit12;
TEdit *Edit14;
TButton *Button11;
TButton *Button12;
TButton *Button13;
TButton *Button14;
TSpeedButton *SpeedButton2;
TSpeedButton *SpeedButton3;
TDataSource *DataSource8;
TQuery *Query8;
TQuery *Query9;
TDataSource *DataSource9;
TDataSource *DataSource10;
TQuery *Query10;
TQuery *Query11;
TDataSource *DataSource11;
TDataSource *DataSource12;
TQuery *Query12;
TQuery *Query13;
TDataSource *DataSource13;
TDataSource *DataSource14;
TQuery *Query14;
TGroupBox *GroupBox13;
TDBGrid *DBGrid8;
TDataSource *DataSource15;
TQuery *Query15;
TDBNavigator *DBNavigator8;
TGroupBox *GroupBox14;
TLabel *Label9;
TEdit *Edit15;
TDBGrid *DBGrid9;
TDBGrid *DBGrid10;
TDBNavigator *DBNavigator9;
TDBNavigator *DBNavigator10;
TDataSource *DataSource16;
TDataSource *DataSource17;
TQuery *Query16;
TQuery *Query17;
TGroupBox *GroupBox15;
TLabel *Label10;
TEdit *Edit13;
TGroupBox *GroupBox16;
TLabel *Label11;
TEdit *Edit16;
TTable *Table1;
TTable *Table2;
TTable *Table3;
void __fastcall N6Click(TObject *Sender);
void __fastcall N8Click(TObject *Sender);
void __fastcall N2Click(TObject *Sender);
void __fastcall N3Click(TObject *Sender);
void __fastcall N4Click(TObject *Sender);
void __fastcall N5Click(TObject *Sender);
void __fastcall ORZ1Click(TObject *Sender);
void __fastcall Button11Click(TObject *Sender);
void __fastcall Button12Click(TObject *Sender);
void __fastcall Button13Click(TObject *Sender);
void __fastcall Button14Click(TObject *Sender);
void __fastcall Button2Click(TObject *Sender);
void __fastcall Button4Click(TObject *Sender);
void __fastcall Button6Click(TObject *Sender);
void __fastcall Button8Click(TObject *Sender);
void __fastcall Button10Click(TObject *Sender);
void __fastcall Button15Click(TObject *Sender);
void __fastcall Button17Click(TObject *Sender);
void __fastcall N9Click(TObject *Sender);
void __fastcall N10Click(TObject *Sender);
void __fastcall N11Click(TObject *Sender);
void __fastcall Button1Click(TObject *Sender);
// void UpdateComboBox();
private: // User declarations
public: // User declarations
__fastcall TForm1(TComponent* Owner);
void UpdateComboBoxGoods();
void UpdateComboBoxSale();
void UpdateComboBoxSupplies();
void UpdateComboBoxWrite_off();
void UpdateComboBoxInventory();
void GZ();
// void UpdateComboBox();
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
//---------------------------------------------------------------------------
#ifndef Unit2H
#define Unit2H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include <DB.hpp>
#include <DBCtrls.hpp>
#include <DBTables.hpp>
//---------------------------------------------------------------------------
class TForm2: public TForm
{
__published: // IDE-managed Components
TDateTimePicker *DateTimePicker1;
TDateTimePicker *DateTimePicker2;
TLabel *Label1;
TLabel *Label2;
TLabel *Label3;
TLabel *Label4;
TDataSource *DataSource1;
TQuery *Query1;
TButton *Button1;
TButton *Button2;
TComboBox *ComboBox1;
TLabel *Label5;
TComboBox *ComboBox2;
TDataSource *DataSource2;
TQuery *Query2;
void __fastcall Button1Click(TObject *Sender);
void __fastcall Button2Click(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TForm2(TComponent* Owner);
void UpdateComboBox();
};
//---------------------------------------------------------------------------
extern PACKAGE TForm2 *Form2;
//---------------------------------------------------------------------------
#endif
//---------------------------------------------------------------------------
#ifndef Unit3H
#define Unit3H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include <DB.hpp>
#include <DBTables.hpp>
//---------------------------------------------------------------------------
class TForm3: public TForm
{
__published: // IDE-managed Components
TLabel *Label1;
TLabel *Label5;
TLabel *Label4;
TLabel *Label3;
TLabel *Label2;
TDateTimePicker *DateTimePicker2;
TDateTimePicker *DateTimePicker1;
TComboBox *ComboBox2;
TComboBox *ComboBox1;
TButton *Button2;
TButton *Button1;
TLabel *Label6;
TComboBox *ComboBox3;
TQuery *Query1;
TQuery *Query2;
TDataSource *DataSource1;
TDataSource *DataSource2;
void __fastcall Button1Click(TObject *Sender);
void __fastcall Button2Click(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TForm3(TComponent* Owner);
void UpdateComboBox();
};
//---------------------------------------------------------------------------
extern PACKAGE TForm3 *Form3;
//---------------------------------------------------------------------------
#endif