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

#ifndef DatainH
#define DatainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Grids.hpp>
#include <DBGrids.hpp>
#include <ExtCtrls.hpp>
#include <DB.hpp>
#include <DBTables.hpp>
#include <Buttons.hpp>
#include <DBCtrls.hpp>
#include <ComCtrls.hpp>
//---------------------------------------------------------------------------
class TDataInForm : public TForm
{
__published:	// IDE-managed Components
        TDataSource *listDataSource;
        TQuery *Query1;
        TPanel *Panel1;
        TLabel *Label6;
        TDateTimePicker *DateP2;
        TEdit *DEdit;
        TRadioGroup *GSUnit;
        TButton *DSBtn;
        TStringGrid *GoodsSg;
        TGroupBox *GroupBox1;
        TLabel *Label1;
        TLabel *Label5;
        TLabel *Label8;
        TLabeledEdit *BarEdit;
        TLabeledEdit *GoodsEdit;
        TLabeledEdit *StdEdit;
        TComboBox *GroupCmb;
        TLabeledEdit *StockEdit;
        TLabeledEdit *SpEdit;
        TButton *DelBt;
        TBitBtn *SaveBt;
        TButton *ModifyBt;
        TBitBtn *NewBt;
        TLabeledEdit *BarMaker;
        TDateTimePicker *DateP1;
        TPanel *Panel2;
        TLabel *Label3;
        TDateTimePicker *DateTimePicker2;
        TEdit *SEdit;
        TRadioGroup *IbSUnit;
        TButton *SearchBtn;
        TStringGrid *ListSG;
        TGroupBox *GroupBox2;
        TLabel *Label2;
        TLabel *Label4;
        TLabel *Label9;
        TLabeledEdit *ManyEdit;
        TLabeledEdit *BpEdit;
        TComboBox *SellerCmb;
        TButton *IbgoBt;
        TButton *IndelBt;
        TButton *InmodyBt;
        TDateTimePicker *DateTimePicker1;
        TLabeledEdit *BarEdit2;
        TRadioGroup *bugaRG;
        TRadioGroup *JukribRG;
        void __fastcall SaveBtClick(TObject *Sender);
        void __fastcall ListSGKeyPress(TObject *Sender, char &Key);
        void __fastcall FormActivate(TObject *Sender);
        void __fastcall SearchBtnClick(TObject *Sender);
        void __fastcall ModifyBtClick(TObject *Sender);
        void __fastcall IbgoBtClick(TObject *Sender);
        void __fastcall DelBtClick(TObject *Sender);
        void __fastcall InmodyBtClick(TObject *Sender);
        void __fastcall IndelBtClick(TObject *Sender);
        void __fastcall GoodsSgKeyPress(TObject *Sender, char &Key);
        void __fastcall NewBtClick(TObject *Sender);
        void __fastcall BarEditKeyPress(TObject *Sender, char &Key);
        void __fastcall BarEditChange(TObject *Sender);
        void __fastcall GoodsSgDblClick(TObject *Sender);
        void __fastcall ListSGDblClick(TObject *Sender);
        void __fastcall BarMakerKeyPress(TObject *Sender, char &Key);
        void __fastcall DSBtnClick(TObject *Sender);
        void __fastcall DEditKeyPress(TObject *Sender, char &Key);
        void __fastcall SEditKeyPress(TObject *Sender, char &Key);
        void __fastcall GoodsEditKeyPress(TObject *Sender, char &Key);
        void __fastcall BarEdit2Change(TObject *Sender);
        void __fastcall BarEditKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall BarEdit2KeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall GoodsEditKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall StdEditKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall GroupCmbKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall StockEditKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall SpEditKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall ManyEditKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall BpEditKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall SellerCmbKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall NewBtExit(TObject *Sender);
        void __fastcall IndelBtExit(TObject *Sender);
        void __fastcall SaveBtKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall ModifyBtKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall DelBtKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall NewBtKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall IbgoBtKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall InmodyBtKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall IndelBtKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall bugaRGClick(TObject *Sender);
        void __fastcall JukribRGClick(TObject *Sender);
        void __fastcall GoodsEditChange(TObject *Sender);
private:	// User declarations
public:		// User declarations
        __fastcall TDataInForm(TComponent* Owner);
    bool SearchGoods(String st);
        void SearchSale(String date);
        bool ChkGoods(String st);
        bool BarChk(String st);
        void SearchIn(String date);
        
};
//---------------------------------------------------------------------------
extern PACKAGE TDataInForm *DataInForm;
//---------------------------------------------------------------------------
#endif
