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

#ifndef FRAME_FacilityFailActionFH
#define FRAME_FacilityFailActionFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Menus.hpp>
#include <ADODB.hpp>
#include <DB.hpp>
#include "CDSFacilityF.h"
#include "CDSFacilityFailF.h"
#include "cxButtons.hpp"
#include "cxCalc.hpp"
#include "cxCalendar.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 "cxLabel.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"
#include "dxSkinMcSkin.hpp"
//---------------------------------------------------------------------------
class TFRAMEFacilityFailAction : public TFrame
{
__published:	// IDE-managed Components
    TPanel *PnlTop;
    TPanel *PnlBottom;
    TcxButton *BtnExlSave;
    TLabel *LblRecords;
    TcxGrid *CxList;
    TcxGridTableView *TvList;
    TcxGridColumn *Column00;
    TcxGridColumn *Column02;
    TcxGridColumn *Column01;
    TcxGridColumn *Column03;
    TcxGridColumn *Column07;
    TcxGridColumn *Column06;
    TcxGridColumn *Column09;
    TcxGridColumn *Column10;
    TcxGridColumn *Column04;
    TcxGridColumn *Column05;
    TcxGridColumn *Column99;
    TcxGridLevel *GlList;
    TcxButton *BtnEdit;
    TcxButton *BtnInsert;
    TcxButton *BtnDelete;
    TcxButton *BtnApply;
    TcxCheckBox *ChkAutoWidth;
    TcxButton *BtnBestFit;
    TcxLabel *LblFacility;
    TImage *ImgDesc01;
    TcxButton *BtnSearch;
    TcxGridColumn *Column08;
    TcxLabel *lblTitle;
    TcxLabel *lblFileName;
    void __fastcall TvListDataControllerFilterChanged(TObject *Sender);
    void __fastcall BtnExlSaveClick(TObject *Sender);
    void __fastcall BtnEditClick(TObject *Sender);
    void __fastcall BtnInsertClick(TObject *Sender);
    void __fastcall BtnDeleteClick(TObject *Sender);
    void __fastcall BtnApplyClick(TObject *Sender);
    void __fastcall ChkAutoWidthPropertiesChange(TObject *Sender);
    void __fastcall BtnBestFitClick(TObject *Sender);
    void __fastcall TvListKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
    void __fastcall TvListCustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas, TcxGridTableDataCellViewInfo *AViewInfo,
          bool &ADone);
    void __fastcall ColumnPropertiesValidate(TObject *Sender, Variant &DisplayValue, TCaption &ErrorText, bool &Error);


private:	// User declarations
    TcxDataController *m_pGDC;
    String             FTitle;
    TItsFacilityFail  *FFacilityFail;
    bool               FUpdate;
    int                FKeySeq;

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

    void __fastcall UpdateCheck();
    void __fastcall UpdateList(TItsFacilityFail *AFacilityFail);
    void __fastcall ChangeEditMode(bool AEdit);

    bool __fastcall GetNewId(String &ANewId);
    bool __fastcall AddObjectItem(TItsFacilityFailAction *pObj, String AMode);
    bool __fastcall IsUpdate();
    void __fastcall SaveData();

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

