uMain.h
上传用户:liuxiao
上传日期:2022-07-06
资源大小:1115k
文件大小:7k
源码类别:

打印编程

开发平台:

C++ Builder

  1. //---------------------------------------------------------------------------
  2. #ifndef uMainH
  3. #define uMainH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <ComCtrls.hpp>
  10. #include <ImgList.hpp>
  11. #include <Menus.hpp>
  12. #include <ToolWin.hpp>
  13. #include <Dialogs.hpp>
  14. #include "frxClass.hpp"
  15. #include "frxPreview.hpp"
  16. #include <ADODB.hpp>
  17. #include <DB.hpp>
  18. #include <ExtCtrls.hpp>
  19. #include <jpeg.hpp>
  20. #include <Buttons.hpp>
  21. #include "WinSkinData.hpp"
  22. #include <DBGrids.hpp>
  23. #include <Grids.hpp>
  24. #include <Graphics.hpp>
  25. #include "frxDBSet.hpp"
  26. #include "frxDesgn.hpp"
  27. //---------------------------------------------------------------------------
  28. class TfrmMain : public TForm
  29. {
  30. __published: // IDE-managed Components
  31.     TMainMenu *mmMain;
  32.     TStatusBar *stbMain;
  33.     TToolBar *tlbMain;
  34.     TMenuItem *miHelp;
  35.     TMenuItem *miShowAbout;
  36.     TMenuItem *miNoHelp;
  37.     TMenuItem *miNone2;
  38.     TMenuItem *miData;
  39.     TMenuItem *miShowOrder;
  40.     TMenuItem *miPrintBill;
  41.     TMenuItem *miNone1;
  42.     TMenuItem *miExitApp;
  43.     TImageList *il32;
  44.     TToolButton *btnShowOrder;
  45.     TToolButton *btnShowQuery;
  46.     TfrxReport *frReport;
  47.     TADOConnection *con;
  48.     TMenuItem *miShowQuery;
  49.     TToolButton *btnNone1;
  50.     TToolButton *btnShowAbout;
  51.     TTimer *tmrClock;
  52.     TSkinData *sknMain;
  53.     TDataSource *dsOrder;
  54.     TADOQuery *qryOrder;
  55.     TPageControl *pgcMain;
  56.     TTabSheet *tsOrder;
  57.     TTabSheet *tsQuery;
  58.     TDBGrid *dbgrdTemp;
  59.     TPanel *pnlQuery;
  60.     TToolButton *btnPrintBill;
  61.     TTabSheet *tsFirst;
  62.     TImage *imgWelcome;
  63.     TLabel *lblAppTitle;
  64.     TLabel *lblAppVer;
  65.     TPanel *pnlFirstBack;
  66.     TDBGrid *dbgrdOrder;
  67.     TADOTable *tblTemp;
  68.     TLabel *lbl1;
  69.     TLabeledEdit *edtTitle;
  70.     TLabeledEdit *edtBillNumber;
  71.     TDateTimePicker *dtpGenBillDate;
  72.     TLabeledEdit *edtClient;
  73.     TLabeledEdit *edtOpera;
  74.     TLabeledEdit *edtBillAuthor;
  75.     TLabeledEdit *edtAddress;
  76.     TLabeledEdit *edtTel;
  77.     TLabeledEdit *edtGath;
  78.     TLabeledEdit *edtIssue;
  79.     TLabeledEdit *edtCheck;
  80.     TLabeledEdit *edtHotLine;
  81.     TLabel *lbl3;
  82.     TBitBtn *btnClearDetail;
  83.     TBitBtn *btnSaveAndPrint;
  84.     TDataSource *dsTemp;
  85.     TDataSource *dsDetail;
  86.     TADOQuery *qryDetail;
  87.     TDBGrid *dbgrdDetail;
  88.     TLabel *lbl2;
  89.     TLabel *lbl4;
  90.     TLabeledEdit *edtQueryByBillNumber;
  91.     TLabeledEdit *edtQueryByClient;
  92.     TLabeledEdit *edtQueryByBillAuthor;
  93.     TLabeledEdit *edtQueryByOpera;
  94.     TButton *btnQuery;
  95.     TButton *btnQueryAll;
  96.     TDateTimePicker *dtpQueryStart;
  97.     TDateTimePicker *dtpQueryEnd;
  98.     TLabel *lbl5;
  99.     TCheckBox *chkQueryByDate;
  100.     TSpeedButton *btnDeleteDetail;
  101.     TAutoIncField *qryOrderfNo;
  102.     TWideStringField *qryOrderfBillNumber;
  103.     TDateTimeField *qryOrderfGenBillDate;
  104.     TWideStringField *qryOrderfClient;
  105.     TWideStringField *qryOrderfOpera;
  106.     TWideStringField *qryOrderfBillAuthor;
  107.     TWideStringField *qryOrderfAddress;
  108.     TWideStringField *qryOrderfTel;
  109.     TWideStringField *qryOrderfGath;
  110.     TWideStringField *qryOrderfIssue;
  111.     TWideStringField *qryOrderfCheck;
  112.     TWideStringField *qryOrderfHotLine;
  113.     TWideStringField *qryOrderfTitle;
  114.     TAutoIncField *tblTempfNo;
  115.     TWideStringField *tblTempfBillNumber;
  116.     TWideStringField *tblTempfBatchNumber;
  117.     TWideStringField *tblTempfLeechdom;
  118.     TWideStringField *tblTempfSpec;
  119.     TWideStringField *tblTempfProFact;
  120.     TWideStringField *tblTempfUnit;
  121.     TIntegerField *tblTempfAmount;
  122.     TBCDField *tblTempfUnitPrice;
  123.     TBCDField *tblTempfSum;
  124.     TBCDField *tblTempfRefer;
  125.     TWideStringField *tblTempfCasing;
  126.     TWideStringField *tblTempfBale;
  127.     TAutoIncField *qryDetailfNo;
  128.     TWideStringField *qryDetailfBillNumber;
  129.     TWideStringField *qryDetailfBatchNumber;
  130.     TWideStringField *qryDetailfLeechdom;
  131.     TWideStringField *qryDetailfSpec;
  132.     TWideStringField *qryDetailfProFact;
  133.     TWideStringField *qryDetailfUnit;
  134.     TIntegerField *qryDetailfAmount;
  135.     TBCDField *qryDetailfUnitPrice;
  136.     TBCDField *qryDetailfSum;
  137.     TBCDField *qryDetailfRefer;
  138.     TWideStringField *qryDetailfCasing;
  139.     TWideStringField *qryDetailfBale;
  140.     TSpeedButton *btnSaveDetail;
  141.     TSpeedButton *btnDeleteOrder;
  142.     TSpeedButton *btnSaveOrder;
  143.     TSpeedButton *btnDeleteTemp;
  144.     TSpeedButton *btnSaveTemp;
  145.     TfrxDBDataset *frxds;
  146.     TMenuItem *miNone3;
  147.     TMenuItem *miDesignReport;
  148.     TfrxDesigner *frxdsgnr1;
  149.     TBCDField *qryOrderfDiscount;
  150.     TLabeledEdit *edtDiscount;
  151.     void __fastcall btnCloseOrderClick(TObject *Sender);
  152.     void __fastcall miExitAppClick(TObject *Sender);
  153.     void __fastcall miShowOrderClick(TObject *Sender);
  154.     void __fastcall miShowQueryClick(TObject *Sender);
  155.     void __fastcall miPrintBillClick(TObject *Sender);
  156.     void __fastcall miShowAboutClick(TObject *Sender);
  157.     void __fastcall FormKeyPress(TObject *Sender, char &Key);
  158.     void __fastcall tmrClockTimer(TObject *Sender);
  159.     void __fastcall btnContinueDetailClick(TObject *Sender);
  160.     void __fastcall btnOrderInfoClick(TObject *Sender);
  161.     void __fastcall btnSaveAndPrintClick(TObject *Sender);
  162.     void __fastcall btnQueryAllClick(TObject *Sender);
  163.     void __fastcall btnQueryClick(TObject *Sender);
  164.     void __fastcall btnDeleteOrderClick(TObject *Sender);
  165.     void __fastcall btnDeleteDetailClick(TObject *Sender);
  166.     void __fastcall btnClearDetailClick(TObject *Sender);
  167.     void __fastcall dbgrdOrderCellClick(TColumn *Column);
  168.     void __fastcall btnSaveDetailClick(TObject *Sender);
  169.     void __fastcall btnSaveOrderClick(TObject *Sender);
  170.     void __fastcall btnDeleteTempClick(TObject *Sender);
  171.     void __fastcall btnSaveTempClick(TObject *Sender);
  172.     void __fastcall qryDetailBeforePost(TDataSet *DataSet);
  173.     void __fastcall miDesignReportClick(TObject *Sender);
  174.     Variant __fastcall frReportUserFunction(const AnsiString MethodName,
  175.           Variant &Params);
  176.     void __fastcall qryDetailAfterInsert(TDataSet *DataSet);
  177.     void __fastcall tblTempAfterInsert(TDataSet *DataSet);
  178.     void __fastcall tblTempfUnitPriceChange(TField *Sender);
  179.     void __fastcall tblTempfAmountChange(TField *Sender);
  180. private: // User declarations
  181.     void __fastcall CrnClearOrderForm();
  182.     int nLine1, nLine2;
  183.     float inputXj, intemp;
  184. public: // User declarations
  185.     __fastcall TfrmMain(TComponent* Owner);
  186. };
  187. //---------------------------------------------------------------------------
  188. extern PACKAGE TfrmMain *frmMain;
  189. //---------------------------------------------------------------------------
  190. #endif