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

#ifndef IHS0080MFH
#define IHS0080MFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <jpeg.hpp>
#include <Buttons.hpp>
#include <ImgList.hpp>
#include <Graphics.hpp>
#include <DB.hpp>
#include <DBClient.hpp>
#include <Provider.hpp>
#include <Menus.hpp>
#include <ComCtrls.hpp>
#include <ADODB.hpp>
#include <Dialogs.hpp>
#include "cxButtons.hpp"
#include "cxCalendar.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 "cxMaskEdit.hpp"
#include "cxPC.hpp"
#include "cxPCdxBarPopupMenu.hpp"
#include "cxSpinEdit.hpp"
#include "cxStyles.hpp"
#include "cxTextEdit.hpp"
#include "cxTimeEdit.hpp"
#include "dxSkinBlack.hpp"
#include "dxSkinBlue.hpp"
#include "dxSkinsCore.hpp"
#include "dxSkinscxPCPainter.hpp"
#include "dxSkinMcSkin.hpp"
#include "cxCalc.hpp"
#include "cxGroupBox.hpp"
#include "cxSplitter.hpp"
#include "cxCheckBox.hpp"
//---------------------------------------------------------------------------

class TIHS0080M : public TForm
{
__published:	// IDE-managed Components
	TTimer *TmrRefresh;
	TShape *ShpList;
    TcxPageControl *PgList;
    TcxTabSheet *TsList;
    TShape *ShpTitle;
    TcxButton *BtnClose;
    TLabel *LblCaption;
    TPanel *Panel2;
    TImage *ImgDesc1;
    TcxLabel *cxLabel1;
    TcxLabel *cxLabel2;
    TADOQuery *ADOQry;
    TDateTimePicker *DtEdTime;
    TDateTimePicker *DtEdDate;
    TDateTimePicker *DtStDate;
    TDateTimePicker *DtStTime;
    TcxGroupBox *grpIncdInfo;
    TcxSplitter *cxSplitter1;
    TcxGroupBox *cxGroupBox1;
    TPanel *PnlBottom;
    TLabel *LblRecords;
    TLabel *LbDef;
    TcxButton *BtnExlSave;
    TcxButton *BtnSearch;
    TcxGroupBox *cxGroupBox4;
    TImage *ImgDesc04;
    TImage *ImgDesc05;
    TImage *ImgDesc06;
    TImage *ImgDesc15;
    TImage *ImgDesc16;
    TcxLabel *cxLabel6;
    TcxTextEdit *EdOCRR_LCTN_NM;
    TcxLabel *cxLabel7;
    TcxTextEdit *EdINCD_EXPL;
    TcxLabel *cxLabel8;
    TcxComboBox *CbCMTR_GRAD_CD;
    TcxLabel *cxLabel21;
    TcxTextEdit *EdLINK_ID;
    TcxLabel *cxLabel22;
    TcxLabel *cxLabel23;
    TcxButton *BtnSelect;
    TcxSpinEdit *SePosX;
    TcxSpinEdit *SePosY;
    TcxGroupBox *cxGroupBox5;
    TImage *ImgDesc19;
    TImage *ImgDesc20;
    TImage *ImgDesc22;
    TImage *ImgDesc21;
    TImage *ImgDesc24;
    TImage *ImgDesc25;
    TcxLabel *cxLabel33;
    TcxCheckBox *ChkINCD_OCRR_LANE_Extra;
    TcxCheckBox *ChkINCD_OCRR_LANE_1;
    TcxCheckBox *ChkINCD_OCRR_LANE_2;
    TcxCheckBox *ChkINCD_OCRR_LANE_4;
    TcxCheckBox *ChkINCD_OCRR_LANE_3;
    TcxCheckBox *ChkINCD_OCRR_LANE_5;
    TcxLabel *cxLabel34;
    TcxCheckBox *ChkINCD_CLSR_LANE_Extra;
    TcxCheckBox *ChkINCD_CLSR_LANE_1;
    TcxCheckBox *ChkINCD_CLSR_LANE_2;
    TcxCheckBox *ChkINCD_CLSR_LANE_4;
    TcxCheckBox *ChkINCD_CLSR_LANE_3;
    TcxCheckBox *ChkINCD_CLSR_LANE_5;
    TcxLabel *cxLabel35;
    TcxLabel *cxLabel36;
    TcxSpinEdit *SeSMLT_VHCL_UNUM;
    TcxSpinEdit *SeINJR_PNUM;
    TcxLabel *cxLabel37;
    TcxLabel *cxLabel38;
    TcxSpinEdit *SeMDLT_VHCL_UNUM;
    TcxSpinEdit *SeFTLT_PNUM;
    TcxLabel *cxLabel39;
    TcxComboBox *CbWTHR_CD;
    TcxLabel *cxLabel40;
    TcxSpinEdit *SeDELY_LNGT;
    TcxLabel *cxLabel41;
    TcxSpinEdit *SeINCD_LNGT;
    TcxLabel *cxLabel42;
    TcxCheckBox *ChkTRUB_VHCL_YN;
    TcxCheckBox *ChkFALT_YN;
    TcxCheckBox *ChkFRWT_YN;
    TPanel *PnlControl;
    TImage *ImgDesc23;
    TcxLabel *cxLabel43;
    TcxComboBox *CbTRVL_LMNT_TYPE_CD;
    TcxLabel *cxLabel44;
    TcxComboBox *CbRESP_LVL_CD;
    TcxLabel *cxLabel45;
    TcxCheckBox *ChkUTIS_CNCT_YN;
    TcxGroupBox *cxGroupBox6;
    TImage *Image1;
    TImage *Image2;
    TImage *Image3;
    TcxLabel *cxLabel9;
    TcxLabel *cxLabel10;
    TcxLabel *cxLabel11;
    TcxLabel *cxLabel14;
    TcxLabel *cxLabel15;
    TcxLabel *cxLabel16;
    TcxComboBox *CbINCD_END_CNFM_MTHD_CD;
    TcxDateEdit *DtINCD_END_DT;
    TcxTextEdit *EdMBLZ_EQPM_CONT;
    TcxSpinEdit *SeMBLZ_PNUM;
    TcxTextEdit *EdRECR_CONT;
    TcxSpinEdit *SeRECR_PERD;
    TcxTextEdit *EdLinkId;
    TcxTextEdit *EdRegDt;
    TcxTextEdit *EdINCD_ORGN_CD;
    TcxLabel *cxLabel5;
    TImage *ImgDesc03;
    TcxTextEdit *EdRGST_DT;
    TcxLabel *cxLabel4;
    TImage *ImgDesc02;
    TcxTextEdit *EdINCD_OCRR_ID;
    TcxLabel *cxLabel3;
    TImage *ImgDesc01;
    TcxTextEdit *EdINCD_STRT_DT;
    TcxTextEdit *cxTextEdit2;
    TImage *Image5;
    TcxTextEdit *cxTextEdit3;
    TcxLabel *cxLabel17;
    TImage *Image6;
    TcxLabel *cxLabel13;
    TcxLabel *cxLabel12;
    TImage *Image4;
    TcxGrid *CxList;
    TcxGridTableView *TvList;
    TcxGridColumn *Column01;
    TcxGridColumn *Column02;
    TcxGridColumn *Column04;
    TcxGridColumn *Column03;
    TcxGridColumn *Column14;
    TcxGridColumn *Column15;
    TcxGridColumn *Column16;
    TcxGridColumn *Column05;
    TcxGridColumn *Column09;
    TcxGridColumn *Column10;
    TcxGridColumn *Column11;
    TcxGridColumn *Column12;
    TcxGridColumn *Column13;
    TcxGridColumn *Column35;
    TcxGridColumn *Column17;
    TcxGridColumn *Column18;
    TcxGridColumn *Column36;
    TcxGridColumn *Column37;
    TcxGridColumn *Column38;
    TcxGridColumn *Column39;
    TcxGridColumn *Column40;
    TcxGridColumn *Column41;
    TcxGridColumn *Column06;
    TcxGridColumn *Column07;
    TcxGridColumn *Column08;
    TcxGridColumn *Column19;
    TcxGridColumn *Column20;
    TcxGridColumn *Column21;
    TcxGridColumn *Column22;
    TcxGridColumn *Column23;
    TcxGridColumn *Column24;
    TcxGridColumn *Column25;
    TcxGridColumn *Column26;
    TcxGridColumn *Column27;
    TcxGridColumn *Column28;
    TcxGridColumn *Column29;
    TcxGridColumn *Column30;
    TcxGridColumn *Column31;
    TcxGridColumn *Column32;
    TcxGridColumn *Column33;
    TcxGridColumn *Column34;
    TcxGridColumn *Column99;
    TcxGridLevel *GlList;
	void __fastcall FormShow(TObject *Sender);
	void __fastcall TmrRefreshTimer(TObject *Sender);
	void __fastcall BtnSearchClick(TObject *Sender);
    void __fastcall BtnExlSave1Click(TObject *Sender);
    void __fastcall BtnCloseClick(TObject *Sender);
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall TvListCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
          TShiftState AShift, bool &AHandled);
private:	// User declarations
	void __fastcall CommClose();

    String              FTitle;
    TcxDataController  *m_pGDC;
    String              FStDateTime;
    String              FEdDateTime;

    TItsCode   *FCodeIST;	//돌발상황 원본 코드 : IST
    TItsCode   *FCodeLTCU;	//소통 등급 코드 : LTCU
    TItsCode   *FCodeICM;	//돌발상황 확인 방법 코드 : ICM
    TItsCode   *FCodeIDTU;	//돌발상황 유형 분류 코드 : IDTU

    TItsCode   *FCodeACTU;	//돌발상황 유형 코드 : ACTU, CRTU, EVTU, WETU 중 하나
    TItsCode   *FCodeCRTU;	//돌발상황 유형 코드 : ACTU, CRTU, EVTU, WETU 중 하나
    TItsCode   *FCodeEVTU;	//돌발상황 유형 코드 : ACTU, CRTU, EVTU, WETU 중 하나
    TItsCode   *FCodeWETU;	//돌발상황 유형 코드 : ACTU, CRTU, EVTU, WETU 중 하나
    TItsCode   *FCodeCNTU;	//돌발상황 유형 코드 : ACTU, CRTU, EVTU, WETU 중 하나
    TItsCode   *FCodeCATU;	//돌발상황 유형 코드 : ACTU, CRTU, EVTU, WETU 중 하나
    TItsCode   *FCodeAETC;

    TItsCode   *FCodeSRLU;	//돌발상황 심각도 코드 : SRLU
    TItsCode   *FCodePRTU;	//통행 제한 유형 코드 : PRTU
    TItsCode   *FCodeRSL;	//대응 수준 코드 : RSL
    TItsCode   *FCodeISS;	//돌발상황 진행 단계 코드 : ISS
    //TItsCode   *FCodeICM;	//돌발상황 종료 확인 방법 코드 : ICM
    TItsCode   *FCodeDFW;	//기상 코드 : DFW
    TItsCode   *FCodeVIT;	//VMS 돌발 유형 코드 : VIT
    TItsCode   *FCodeIDT;	//VMS 돌발 유형 세부 코드 : IDT
    TItsCode   *FCodeEDT;	//VMS 돌발 유형 세부 코드 : EDT
    TItsCode   *FCodeVRT;	//VMS 돌발 통제 코드 : VRT

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

    void __fastcall OnMessage(TMessage &Msg);

    void __fastcall FormInit();

	void __fastcall RefreshData();

    void __fastcall SelHistory();
    String __fastcall GetStringToDateTime(String ADateTime);
    void __fastcall DspHistory();

    void __fastcall ClearDisplayField();
    void __fastcall DisplayIncidentInfo();
};
//---------------------------------------------------------------------------
extern PACKAGE TIHS0080M *IHS0080M;
//---------------------------------------------------------------------------
#endif
