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

#ifndef IDB0080MFH
#define IDB0080MFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <DB.hpp>
#include <DBClient.hpp>
#include <FMTBcd.hpp>
#include <Provider.hpp>
#include <SqlExpr.hpp>
#include <Menus.hpp>
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
#include <ComCtrls.hpp>
#include <ADODB.hpp>
//---------------------------------------------------------------------------
#include "DataTypesF.h"
#include "CDSCodeF.h"
#include "cxButtons.hpp"
#include "cxCalc.hpp"
#include "cxCheckBox.hpp"
#include "cxClasses.hpp"
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDataStorage.hpp"
#include "cxDropDownEdit.hpp"
#include "cxEdit.hpp"
#include "cxFilter.hpp"
#include "cxGraphics.hpp"
#include "cxGrid.hpp"
#include "cxGridCustomTableView.hpp"
#include "cxGridCustomView.hpp"
#include "cxGridLevel.hpp"
#include "cxGridTableView.hpp"
#include "cxGroupBox.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include "cxMaskEdit.hpp"
#include "cxSplitter.hpp"
#include "cxStyles.hpp"
#include "cxTextEdit.hpp"
#include "dxSkinBlack.hpp"
#include "dxSkinBlue.hpp"
#include "dxSkinsCore.hpp"
#include "dxSkinscxPCPainter.hpp"
#include "cxLabel.hpp"
#include "dxSkinMcSkin.hpp"

class TIDB0080M : public TForm
{
__published:	// IDE-managed Components
    TTimer *TmrShow;
    TShape *ShpTitle;
    TcxButton *BtnSearch;
    TcxButton *BtnClose;
    TLabel *LblCaption;
    TShape *ShpList;
    TEdit *EdFocus;
    TcxCheckBox *ChkExpand;
    TPanel *Panel3;
    TcxSplitter *cxSplitter1;
    TcxGroupBox *GrpCode;
    TcxGroupBox *GrpSubCode;
    TPanel *Panel1;
    TcxButton *BtnInsert1;
    TcxButton *BtnEdit1;
    TcxButton *BtnCancel1;
    TcxButton *BtnSave1;
    TcxButton *BtnDelete1;
    TcxGroupBox *cxGroupBox1;
    TImage *ImgDesc01;
    TLabel *Label1;
    TLabel *Label5;
    TImage *ImgDesc06;
    TImage *ImgDesc02;
    TLabel *Label3;
    TImage *ImgDesc03;
    TLabel *Label6;
    TImage *ImgDesc04;
    TLabel *Label2;
    TLabel *Label7;
    TImage *ImgDesc09;
    TcxTextEdit *EdId1;
    TcxTextEdit *EdKName1;
    TcxTextEdit *EdEName1;
    TcxTextEdit *EdRemark1;
    TcxTextEdit *EdSysCd;
    TcxComboBox *CbUseYn1;
    TcxTextEdit *EdMsgCd;
    TcxGrid *CxList1;
    TcxGridLevel *GlList1;
    TPanel *Panel2;
    TcxButton *BtnSave2;
    TcxButton *BtnCancel2;
    TcxButton *BtnInsert2;
    TcxButton *BtnEdit2;
    TcxButton *BtnDelete2;
    TcxGroupBox *cxGroupBox2;
    TImage *ImgDesc11;
    TLabel *Label4;
    TLabel *Label9;
    TImage *ImgDesc12;
    TImage *ImgDesc13;
    TLabel *Label10;
    TImage *ImgDesc14;
    TLabel *Label11;
    TImage *ImgDesc15;
    TLabel *Label12;
    TLabel *Label13;
    TImage *ImgDesc16;
    TImage *ImgDesc17;
    TLabel *Label14;
    TcxTextEdit *EdId2;
    TcxTextEdit *EdKName2;
    TcxTextEdit *EdEName2;
    TcxTextEdit *EdRemark2;
    TcxTextEdit *EdAtrb1;
    TcxTextEdit *EdAtrb2;
    TcxComboBox *CbUseYn2;
    TcxTextEdit *EdCdAbbr;
    TPanel *Panel4;
    TImage *ImgDesc05;
    TLabel *Label16;
    TcxTextEdit *EdCmmnClsfCd;
    TcxTextEdit *EdCmmnClsfCdNm;
    TcxGrid *CxList2;
    TcxGridLevel *GlList2;
    TcxGridTableView *TvList1;
    TcxGridTableView *TvList2;
    TcxGridColumn *MColumn01;
    TcxGridColumn *MColumn02;
    TcxGridColumn *MColumn03;
    TcxGridColumn *MColumn04;
    TcxGridColumn *MColumn05;
    TcxGridColumn *MColumn06;
    TcxGridColumn *MColumn07;
    TcxGridColumn *MColumn08;
    TcxGridColumn *MColumn09;
    TcxGridColumn *MColumn10;
    TcxGridColumn *MColumn11;
    TcxGridColumn *MColumn12;
    TcxGridColumn *SColumn01;
    TcxGridColumn *SColumn02;
    TcxGridColumn *SColumn03;
    TcxGridColumn *SColumn04;
    TcxGridColumn *SColumn05;
    TcxGridColumn *SColumn06;
    TcxGridColumn *SColumn07;
    TcxGridColumn *SColumn08;
    TcxGridColumn *SColumn09;
    TcxGridColumn *SColumn10;
    TcxGridColumn *SColumn11;
    TcxGridColumn *SColumn12;
    TcxGridColumn *SColumn13;
    TcxGridColumn *SColumn98;
    TcxGridColumn *MColumn98;
    TLabel *Label8;
    TImage *ImgDesc10;
    TcxLabel *cxLabel1;
    TcxLabel *cxLabel2;
    TcxLabel *cxLabel3;
    TcxLabel *cxLabel4;
    TcxLabel *cxLabel5;
    TcxLabel *cxLabel6;
    TcxLabel *cxLabel7;
    TcxLabel *cxLabel8;
    TcxLabel *cxLabel9;
    TcxLabel *cxLabel10;
    TcxLabel *cxLabel11;
    TcxLabel *cxLabel12;
    TcxLabel *cxLabel13;
    TcxLabel *cxLabel14;
    TcxLabel *cxLabel15;
    TcxLabel *cxLabel16;
    TcxLabel *cxLabel17;
    TcxLabel *cxLabel18;
    TcxLabel *cxLabel19;
    TcxLabel *cxLabel20;
    TcxLabel *cxLabel21;
    TcxLabel *cxLabel22;
    void __fastcall FormShow(TObject *Sender);
    void __fastcall TmrShowTimer(TObject *Sender);
    void __fastcall BtnSearchClick(TObject *Sender);
    void __fastcall BtnCloseClick(TObject *Sender);
    void __fastcall BtnSaveClick(TObject *Sender);
    void __fastcall BtnCancelClick(TObject *Sender);
    void __fastcall BtnInsertClick(TObject *Sender);
    void __fastcall BtnEditClick(TObject *Sender);
    void __fastcall BtnDeleteClick(TObject *Sender);
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall TvList1FocusedRecordChanged(TcxCustomGridTableView *Sender, TcxCustomGridRecord *APrevFocusedRecord,
          TcxCustomGridRecord *AFocusedRecord, bool ANewItemRecordFocusingChanged);
    void __fastcall TvList2FocusedRecordChanged(TcxCustomGridTableView *Sender, TcxCustomGridRecord *APrevFocusedRecord,
          TcxCustomGridRecord *AFocusedRecord, bool ANewItemRecordFocusingChanged);
    void __fastcall TvList1DataControllerFilterChanged(TObject *Sender);
    void __fastcall TvList2DataControllerFilterChanged(TObject *Sender);
private:	// User declarations
    void __fastcall CommClose();

public:
    EN_JOB  m_enJob1;
    EN_JOB  m_enJob2;

    TcxDataController  *m_pGDC1;
    TcxDataController  *m_pGDC2;

    TItsCode    *FCode;
    TItsSubCode *FSubCode;

public:		// User declarations
    __fastcall TIDB0080M(TComponent* Owner);

    void __fastcall FormInit();
    void __fastcall RefreshData();
    void __fastcall SelListData1();
    void __fastcall SelListData2();

    void __fastcall FormClear1();
    void __fastcall FormClear2();

    void __fastcall DisplayListData1();
    void __fastcall DisplayListData2();
    void __fastcall ChangeButtonType1(int nBtnType);
    void __fastcall ChangeButtonType2(int nBtnType);

    void __fastcall DeleteData1();
    void __fastcall DeleteData2();

    bool __fastcall MergeCmmnClsfCd(TItsCode *pCode);
    bool __fastcall MergeCmmnCd(TItsSubCode *pSubCode);
};
//---------------------------------------------------------------------------
extern PACKAGE TIDB0080M *IDB0080M;
//---------------------------------------------------------------------------

#endif

