- //---------------------------------------------------------------------------
- #ifndef uMainH
- #define uMainH
- //---------------------------------------------------------------------------
- #include <Classes.hpp>
- #include <Controls.hpp>
- #include <StdCtrls.hpp>
- #include <Forms.hpp>
- #include <ComCtrls.hpp>
- #include <ImgList.hpp>
- #include <Menus.hpp>
- #include <ToolWin.hpp>
- #include <Dialogs.hpp>
- #include "frxClass.hpp"
- #include "frxPreview.hpp"
- #include <ADODB.hpp>
- #include <DB.hpp>
- #include <ExtCtrls.hpp>
- #include <jpeg.hpp>
- #include <Buttons.hpp>
- #include "WinSkinData.hpp"
- #include <DBGrids.hpp>
- #include <Grids.hpp>
- #include <Graphics.hpp>
- #include "frxDBSet.hpp"
- #include "frxDesgn.hpp"
- //---------------------------------------------------------------------------
- class TfrmMain : public TForm
- {
- __published: // IDE-managed Components
- TMainMenu *mmMain;
- TStatusBar *stbMain;
- TToolBar *tlbMain;
- TMenuItem *miHelp;
- TMenuItem *miShowAbout;
- TMenuItem *miNoHelp;
- TMenuItem *miNone2;
- TMenuItem *miData;
- TMenuItem *miShowOrder;
- TMenuItem *miPrintBill;
- TMenuItem *miNone1;
- TMenuItem *miExitApp;
- TImageList *il32;
- TToolButton *btnShowOrder;
- TToolButton *btnShowQuery;
- TfrxReport *frReport;
- TADOConnection *con;
- TMenuItem *miShowQuery;
- TToolButton *btnNone1;
- TToolButton *btnShowAbout;
- TTimer *tmrClock;
- TSkinData *sknMain;
- TDataSource *dsOrder;
- TADOQuery *qryOrder;
- TPageControl *pgcMain;
- TTabSheet *tsOrder;
- TTabSheet *tsQuery;
- TDBGrid *dbgrdTemp;
- TPanel *pnlQuery;
- TToolButton *btnPrintBill;
- TTabSheet *tsFirst;
- TImage *imgWelcome;
- TLabel *lblAppTitle;
- TLabel *lblAppVer;
- TPanel *pnlFirstBack;
- TDBGrid *dbgrdOrder;
- TADOTable *tblTemp;
- TLabel *lbl1;
- TLabeledEdit *edtTitle;
- TLabeledEdit *edtBillNumber;
- TDateTimePicker *dtpGenBillDate;
- TLabeledEdit *edtClient;
- TLabeledEdit *edtOpera;
- TLabeledEdit *edtBillAuthor;
- TLabeledEdit *edtAddress;
- TLabeledEdit *edtTel;
- TLabeledEdit *edtGath;
- TLabeledEdit *edtIssue;
- TLabeledEdit *edtCheck;
- TLabeledEdit *edtHotLine;
- TLabel *lbl3;
- TBitBtn *btnClearDetail;
- TBitBtn *btnSaveAndPrint;
- TDataSource *dsTemp;
- TDataSource *dsDetail;
- TADOQuery *qryDetail;
- TDBGrid *dbgrdDetail;
- TLabel *lbl2;
- TLabel *lbl4;
- TLabeledEdit *edtQueryByBillNumber;
- TLabeledEdit *edtQueryByClient;
- TLabeledEdit *edtQueryByBillAuthor;
- TLabeledEdit *edtQueryByOpera;
- TButton *btnQuery;
- TButton *btnQueryAll;
- TDateTimePicker *dtpQueryStart;
- TDateTimePicker *dtpQueryEnd;
- TLabel *lbl5;
- TCheckBox *chkQueryByDate;
- TSpeedButton *btnDeleteDetail;
- TAutoIncField *qryOrderfNo;
- TWideStringField *qryOrderfBillNumber;
- TDateTimeField *qryOrderfGenBillDate;
- TWideStringField *qryOrderfClient;
- TWideStringField *qryOrderfOpera;
- TWideStringField *qryOrderfBillAuthor;
- TWideStringField *qryOrderfAddress;
- TWideStringField *qryOrderfTel;
- TWideStringField *qryOrderfGath;
- TWideStringField *qryOrderfIssue;
- TWideStringField *qryOrderfCheck;
- TWideStringField *qryOrderfHotLine;
- TWideStringField *qryOrderfTitle;
- TAutoIncField *tblTempfNo;
- TWideStringField *tblTempfBillNumber;
- TWideStringField *tblTempfBatchNumber;
- TWideStringField *tblTempfLeechdom;
- TWideStringField *tblTempfSpec;
- TWideStringField *tblTempfProFact;
- TWideStringField *tblTempfUnit;
- TIntegerField *tblTempfAmount;
- TBCDField *tblTempfUnitPrice;
- TBCDField *tblTempfSum;
- TBCDField *tblTempfRefer;
- TWideStringField *tblTempfCasing;
- TWideStringField *tblTempfBale;
- TAutoIncField *qryDetailfNo;
- TWideStringField *qryDetailfBillNumber;
- TWideStringField *qryDetailfBatchNumber;
- TWideStringField *qryDetailfLeechdom;
- TWideStringField *qryDetailfSpec;
- TWideStringField *qryDetailfProFact;
- TWideStringField *qryDetailfUnit;
- TIntegerField *qryDetailfAmount;
- TBCDField *qryDetailfUnitPrice;
- TBCDField *qryDetailfSum;
- TBCDField *qryDetailfRefer;
- TWideStringField *qryDetailfCasing;
- TWideStringField *qryDetailfBale;
- TSpeedButton *btnSaveDetail;
- TSpeedButton *btnDeleteOrder;
- TSpeedButton *btnSaveOrder;
- TSpeedButton *btnDeleteTemp;
- TSpeedButton *btnSaveTemp;
- TfrxDBDataset *frxds;
- TMenuItem *miNone3;
- TMenuItem *miDesignReport;
- TfrxDesigner *frxdsgnr1;
- TBCDField *qryOrderfDiscount;
- TLabeledEdit *edtDiscount;
- void __fastcall btnCloseOrderClick(TObject *Sender);
- void __fastcall miExitAppClick(TObject *Sender);
- void __fastcall miShowOrderClick(TObject *Sender);
- void __fastcall miShowQueryClick(TObject *Sender);
- void __fastcall miPrintBillClick(TObject *Sender);
- void __fastcall miShowAboutClick(TObject *Sender);
- void __fastcall FormKeyPress(TObject *Sender, char &Key);
- void __fastcall tmrClockTimer(TObject *Sender);
- void __fastcall btnContinueDetailClick(TObject *Sender);
- void __fastcall btnOrderInfoClick(TObject *Sender);
- void __fastcall btnSaveAndPrintClick(TObject *Sender);
- void __fastcall btnQueryAllClick(TObject *Sender);
- void __fastcall btnQueryClick(TObject *Sender);
- void __fastcall btnDeleteOrderClick(TObject *Sender);
- void __fastcall btnDeleteDetailClick(TObject *Sender);
- void __fastcall btnClearDetailClick(TObject *Sender);
- void __fastcall dbgrdOrderCellClick(TColumn *Column);
- void __fastcall btnSaveDetailClick(TObject *Sender);
- void __fastcall btnSaveOrderClick(TObject *Sender);
- void __fastcall btnDeleteTempClick(TObject *Sender);
- void __fastcall btnSaveTempClick(TObject *Sender);
- void __fastcall qryDetailBeforePost(TDataSet *DataSet);
- void __fastcall miDesignReportClick(TObject *Sender);
- Variant __fastcall frReportUserFunction(const AnsiString MethodName,
- Variant &Params);
- void __fastcall qryDetailAfterInsert(TDataSet *DataSet);
- void __fastcall tblTempAfterInsert(TDataSet *DataSet);
- void __fastcall tblTempfUnitPriceChange(TField *Sender);
- void __fastcall tblTempfAmountChange(TField *Sender);
- private: // User declarations
- void __fastcall CrnClearOrderForm();
- int nLine1, nLine2;
- float inputXj, intemp;
- public: // User declarations
- __fastcall TfrmMain(TComponent* Owner);
- };
- //---------------------------------------------------------------------------
- extern PACKAGE TfrmMain *frmMain;
- //---------------------------------------------------------------------------
- #endif