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

#ifndef FRAME_FailHndlFH
#define FRAME_FailHndlFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Menus.hpp>
//---------------------------------------------------------------------------
#include "DataTypesF.h"
#include "CDSCodeF.h"
#include "CDSFacilityCodeF.h"
#include "CDSFacilityF.h"
#include "CDSFacilityFailF.h"
#include "cxButtons.hpp"
#include "cxCalc.hpp"
#include "cxClasses.hpp"
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDataStorage.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 "cxStyles.hpp"
#include "cxTextEdit.hpp"
#include "dxSkinBlack.hpp"
#include "dxSkinBlue.hpp"
#include "dxSkinsCore.hpp"
#include "dxSkinscxPCPainter.hpp"
//---------------------------------------------------------------------------
class TFRAMEFailHndl : public TFrame
{
__published:	// IDE-managed Components
    TcxGroupBox *GrpCode;
    TPanel *Panel1;
    TcxButton *BtnInsert1;
    TcxButton *BtnEdit1;
    TcxButton *BtnCancel1;
    TcxButton *BtnSave1;
    TcxButton *BtnDelete1;
    TcxGroupBox *cxGroupBox1;
    TImage *ImgDesc01;
    TLabel *Label1;
    TLabel *Label5;
    TImage *ImgDesc06;
    TcxTextEdit *EdId1;
    TcxTextEdit *EdKName1;
    TcxGrid *CxList1;
    TcxGridTableView *TvList1;
    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 *MColumn98;
    TcxGridLevel *GlList1;
    TcxButton *BtnSearch;
    void __fastcall TvList1FocusedRecordChanged(TcxCustomGridTableView *Sender, TcxCustomGridRecord *APrevFocusedRecord,
          TcxCustomGridRecord *AFocusedRecord, bool ANewItemRecordFocusingChanged);
    void __fastcall BtnCancel1Click(TObject *Sender);
    void __fastcall BtnInsert1Click(TObject *Sender);
    void __fastcall BtnEdit1Click(TObject *Sender);
    void __fastcall BtnDelete1Click(TObject *Sender);
    void __fastcall BtnSearchClick(TObject *Sender);
    void __fastcall BtnSave1Click(TObject *Sender);

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

public:		// User declarations

    EN_JOB  m_enJob1;
    TcxDataController     *m_pGDC1;
    TFacilityCodeManager  *FCode;

    void __fastcall FormClear1();
    void __fastcall ChangeButtonType1(int nBtnType);
    void __fastcall SelListData1();
    void __fastcall DisplayListData1();
    void __fastcall DeleteData1();
    void __fastcall RefreshData();
    bool __fastcall MergeMainCode(TFacilityHndlType *ACode);

	void __fastcall OnCloseQuery(bool &CanClose);
};
//---------------------------------------------------------------------------
//extern PACKAGE TFRAMEFailHndl *FRAMEFailHndl;
//---------------------------------------------------------------------------
#endif
