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

#ifndef ITS0020MFH
#define ITS0020MFH
//---------------------------------------------------------------------------
#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 "CDSTrafficOprLinkF.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 "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 "cxSpinEdit.hpp"
#include "cxStyles.hpp"
#include "cxTextEdit.hpp"
#include "dxSkinBlack.hpp"
#include "dxSkinBlue.hpp"
#include "dxSkinCaramel.hpp"
#include "dxSkinCoffee.hpp"
#include "dxSkinDarkRoom.hpp"
#include "dxSkinDarkSide.hpp"
#include "dxSkinFoggy.hpp"
#include "dxSkinGlassOceans.hpp"
#include "dxSkiniMaginary.hpp"
#include "dxSkinLilian.hpp"
#include "dxSkinLiquidSky.hpp"
#include "dxSkinLondonLiquidSky.hpp"
#include "dxSkinMcSkin.hpp"
#include "dxSkinMoneyTwins.hpp"
#include "dxSkinOffice2007Black.hpp"
#include "dxSkinOffice2007Blue.hpp"
#include "dxSkinOffice2007Green.hpp"
#include "dxSkinOffice2007Pink.hpp"
#include "dxSkinOffice2007Silver.hpp"
#include "dxSkinOffice2010Black.hpp"
#include "dxSkinOffice2010Blue.hpp"
#include "dxSkinOffice2010Silver.hpp"
#include "dxSkinsCore.hpp"
#include "dxSkinscxPCPainter.hpp"
#include "dxSkinSeven.hpp"
#include "dxSkinSharp.hpp"
#include "dxSkinSilver.hpp"
#include "dxSkinStardust.hpp"

class TITS0020M : public TForm
{
__published:	// IDE-managed Components
    TTimer *TmrShow;
    TShape *ShpTitle;
    TcxButton *BtnSearch;
    TcxButton *BtnClose;
    TLabel *LblCaption;
    TShape *ShpList;
    TEdit *EdFocus;
    TcxGrid *CxList;
    TcxGridLevel *GlList;
    TcxButton *BtnExlSave;
    TcxButton *BtnInsert;
    TcxButton *BtnDelete;
    TcxButton *BtnApply;
    TcxButton *BtnEdit;
    TcxGridTableView *TvList;
    TcxGridColumn *Column00;
    TcxGridColumn *Column01;
    TcxGridColumn *Column02;
    TcxGridColumn *Column03;
    TcxGridColumn *Column04;
    TcxGridColumn *Column05;
    TcxGridColumn *Column06;
    TcxGridColumn *Column07;
    TcxGridColumn *Column08;
    TcxGridColumn *Column99;
    TcxButton *BtnBestFit;
    TcxLabel *LblRecords;
    TcxCheckBox *ChkAutoWidth;
    TPopupMenu *PopupMenu1;
    TMenuItem *MnuInsert;
    TMenuItem *MnuDelete;
    TMenuItem *MnuDeleteCancel;
    TMenuItem *N5;
    TMenuItem *MnuApply;
    TMenuItem *N8;
    TMenuItem *MnuSave;
    TPopupMenu *PopupAddLink;
    TMenuItem *MnuListAdd;
    TMenuItem *MnuGisAdd;
    TcxGridColumn *Column10;
    TcxGridColumn *Column11;
    TcxButton *BtnMoveGis;
    TcxButton *BtnAllApply;
    TcxButton *BtnAllDelete;
    void __fastcall FormShow(TObject *Sender);
    void __fastcall TmrShowTimer(TObject *Sender);
    void __fastcall BtnSearchClick(TObject *Sender);
    void __fastcall BtnCloseClick(TObject *Sender);
    void __fastcall BtnExlSaveClick(TObject *Sender);
    void __fastcall BtnInsertClick(TObject *Sender);
    void __fastcall BtnDeleteClick(TObject *Sender);
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall BtnEditClick(TObject *Sender);
    void __fastcall BtnBestFitClick(TObject *Sender);
    void __fastcall ChkAutoWidthPropertiesChange(TObject *Sender);
    void __fastcall MnuDeleteCancelClick(TObject *Sender);
    void __fastcall BtnApplyClick(TObject *Sender);
    void __fastcall MnuListAddClick(TObject *Sender);
    void __fastcall MnuGisAddClick(TObject *Sender);
    void __fastcall TvListCustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas, TcxGridTableDataCellViewInfo *AViewInfo,
          bool &ADone);
    void __fastcall ColumnPropertiesValidate(TObject *Sender, Variant &DisplayValue, TCaption &ErrorText, bool &Error);
    void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
    void __fastcall TvListKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
    void __fastcall TvListDataControllerFilterChanged(TObject *Sender);
    void __fastcall BtnMoveGisClick(TObject *Sender);
    void __fastcall BtnAllApplyClick(TObject *Sender);

          
private:	// User declarations
    void __fastcall CommClose();
    String             FTitle;
    TcxDataController *m_pGDC;
    bool               FUpdate;
public:
    
public:		// User declarations
    __fastcall TITS0020M(TComponent* Owner);

    void __fastcall FormInit();
    void __fastcall RefreshData();
    void __fastcall SelListData();

    void __fastcall ChangeEditMode(bool AEdit);

    bool __fastcall AddObjectItem(TItsTrafficOprLink *pObj, String AMode);
    bool __fastcall IsUpdate();
    void __fastcall SaveData();
};
//---------------------------------------------------------------------------
extern PACKAGE TITS0020M *ITS0020M;
//---------------------------------------------------------------------------

#endif

