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

#ifndef FRAME_IncidentProcessFH
#define FRAME_IncidentProcessFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "CDSCodeF.h"
#include "CDSIncidentF.h"
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxEdit.hpp"
#include "cxGraphics.hpp"
#include "cxGroupBox.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.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 "dxSkinSeven.hpp"
#include "dxSkinSharp.hpp"
#include "dxSkinSilver.hpp"
#include "dxSkinStardust.hpp"
#include "cxSplitter.hpp"
#include "cxClasses.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDataStorage.hpp"
#include "cxFilter.hpp"
#include "cxGrid.hpp"
#include "cxGridCustomTableView.hpp"
#include "cxGridCustomView.hpp"
#include "cxGridLevel.hpp"
#include "cxGridTableView.hpp"
#include "cxLabel.hpp"
#include "cxStyles.hpp"
#include "dxSkinscxPCPainter.hpp"
#include "cxButtons.hpp"
#include <ExtCtrls.hpp>
#include <Menus.hpp>
#include "cxTextEdit.hpp"
#include "cxDropDownEdit.hpp"
#include "cxMaskEdit.hpp"
#include "cxCalc.hpp"
#include "cxCalendar.hpp"
#include "cxCheckBox.hpp"
#include "dxGDIPlusClasses.hpp"
#include "cxSpinEdit.hpp"
#include "cxPC.hpp"
#include "cxPCdxBarPopupMenu.hpp"
//---------------------------------------------------------------------------
class TFRAMEIncidentProcess : public TFrame
{
__published:	// IDE-managed Components
    TcxGroupBox *cxGroupBox2;
    TcxSplitter *cxSplitter1;
    TPanel *PnlTitle;
    TcxGroupBox *cxGroupBox3;
    TPanel *Panel1;
    TcxButton *BtnSave;
    TcxGroupBox *cxGroupBox4;
    TImage *ImgDesc01;
    TcxLabel *cxLabel1;
    TcxTextEdit *EdINCD_OCRR_ID;
    TcxLabel *cxLabel2;
    TImage *ImgDesc02;
    TcxTextEdit *EdRGST_DT;
    TcxLabel *cxLabel3;
    TImage *ImgDesc03;
    TcxComboBox *CbINCD_ORGN_CD;
    TImage *ImgDesc04;
    TcxLabel *cxLabel4;
    TcxTextEdit *EdOCRR_LCTN_NM;
    TcxLabel *cxLabel5;
    TImage *ImgDesc05;
    TcxTextEdit *EdINCD_EXPL;
    TcxLabel *cxLabel6;
    TImage *ImgDesc06;
    TcxComboBox *CbCMTR_GRAD_CD;
    TcxGroupBox *cxGroupBox5;
    TcxLabel *cxLabel10;
    TcxLabel *cxLabel11;
    TcxLabel *cxLabel12;
    TcxLabel *cxLabel13;
    TcxLabel *cxLabel20;
    TcxLabel *cxLabel21;
    TImage *ImgDesc15;
    TcxTextEdit *EdLINK_ID;
    TImage *ImgDesc16;
    TcxLabel *cxLabel22;
    TcxLabel *cxLabel23;
    TcxButton *BtnSelect;
    TPopupMenu *PopupSelLink;
    TMenuItem *MnuListAdd;
    TMenuItem *MnuGisAdd;
    TcxLabel *cxLabel24;
    TcxLabel *cxLabel25;
    TPanel *Panel2;
    TcxGroupBox *cxGroupBox7;
    TcxGroupBox *cxGroupBox6;
    TcxCheckBox *ChkVMS_DSPL_YN;
    TPanel *PnlVms;
    TImage *Image1;
    TcxTextEdit *EdEND_LCTN_NM;
    TcxLabel *cxLabel_VMS_INCD_TYPE_CD;
    TcxTextEdit *EdSTRT_LCTN_NM;
    TcxComboBox *CbVMS_INCD_TYPE_CD;
    TcxComboBox *CbVMS_INCD_DETL_TYPE_CD;
    TImage *ImgDesc07;
    TImage *ImgDesc08;
    TImage *ImgDesc09;
    TImage *ImgDesc10;
    TImage *ImgDesc11;
    TImage *ImgDesc13;
    TImage *ImgDesc14;
    TcxLabel *cxLabel19;
    TcxLabel *cxLabel7;
    TcxLabel *cxLabel8;
    TcxLabel *cxLabel9;
    TcxTextEdit *EdIFMR_NM;
    TcxComboBox *CbINCD_CNFM_MTHD_CD;
    TcxComboBox *CbINCD_SERN_CD;
    TcxLabel *cxLabel14;
    TcxLabel *cxLabel15;
    TcxComboBox *CbINCD_TYPE_CLSF_CD;
    TcxComboBox *CbINCD_TYPE_CD;
    TcxLabel *cxLabel17;
    TcxLabel *cxLabel18;
    TcxDateEdit *DtINCD_STRT_DT;
    TcxDateEdit *DtINCD_END_PRAR_DT;
    TcxLabel *cxLabel27;
    TImage *ImgDesc17;
    TcxTextEdit *EdINCD_TITL;
    TcxLabel *cxLabel28;
    TcxLabel *cxLabel29;
    TcxLabel *cxLabel31;
    TcxLabel *cxLabel16;
    TImage *ImgDesc18;
    TcxLabel *cxLabel26;
    TcxLabel *cxLabel30;
    TcxLabel *cxLabel32;
    TImage *ImgDesc19;
    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;
    TImage *ImgDesc20;
    TcxLabel *cxLabel40;
    TcxSpinEdit *SeDELY_LNGT;
    TcxLabel *cxLabel41;
    TcxSpinEdit *SeINCD_LNGT;
    TcxLabel *cxLabel42;
    TImage *ImgDesc22;
    TcxCheckBox *ChkTRUB_VHCL_YN;
    TcxCheckBox *ChkFALT_YN;
    TcxCheckBox *ChkFRWT_YN;
    TPanel *PnlControl;
    TcxLabel *cxLabel43;
    TImage *ImgDesc23;
    TcxComboBox *CbTRVL_LMNT_TYPE_CD;
    TImage *ImgDesc21;
    TcxLabel *cxLabel44;
    TcxComboBox *CbRESP_LVL_CD;
    TcxLabel *cxLabel45;
    TImage *ImgDesc24;
    TcxCheckBox *ChkUTIS_CNCT_YN;
    TImage *ImgDesc25;
    TPanel *Panel3;
    TcxGroupBox *cxGroupBox1;
    TPanel *PnlBottom;
    TLabel *LblRecords;
    TLabel *LbDef;
    TcxButton *BtnExlSave;
    TcxButton *BtnInfoCancel;
    TcxButton *BtnMissInfo;
    TcxPageControl *cxPageControl1;
    TcxTabSheet *cxTabSheet1;
    TcxGrid *CxList;
    TcxGridTableView *TvList;
    TcxGridColumn *Column01;
    TcxGridColumn *Column02;
    TcxGridColumn *Column04;
    TcxGridColumn *Column05;
    TcxGridColumn *Column09;
    TcxGridColumn *Column10;
    TcxGridColumn *Column11;
    TcxGridColumn *Column12;
    TcxGridColumn *Column13;
    TcxGridColumn *Column15;
    TcxGridColumn *Column16;
    TcxGridColumn *Column35;
    TcxGridColumn *Column17;
    TcxGridColumn *Column18;
    TcxGridColumn *Column03;
    TcxGridColumn *Column14;
    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;
    TcxTabSheet *cxTabSheet2;
    TcxGrid *CxList2;
    TcxGridTableView *TvList2;
    TcxGridColumn *ColumnA01;
    TcxGridColumn *ColumnA02;
    TcxGridColumn *ColumnA03;
    TcxGridColumn *ColumnA04;
    TcxGridColumn *ColumnA05;
    TcxGridColumn *ColumnA99;
    TcxGridLevel *GlList2;
    TcxLabel *cxLabel46;
    TcxTextEdit *EdRegDt;
    TcxSpinEdit *SePosX;
    TcxSpinEdit *SePosY;
    TcxTextEdit *EdLinkId;
    TcxGridColumn *ColumnA06;
    TcxGridColumn *ColumnA07;
    TcxGridColumn *ColumnA08;
    TcxGridColumn *ColumnA09;
    void __fastcall TvListDataControllerFilterChanged(TObject *Sender);
    void __fastcall BtnExlSaveClick(TObject *Sender);
    void __fastcall CbINCD_TYPE_CLSF_CDClick(TObject *Sender);
    void __fastcall BtnSaveClick(TObject *Sender);
    void __fastcall TvListCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
          TShiftState AShift, bool &AHandled);
    void __fastcall BtnSelectClick(TObject *Sender);
    void __fastcall CbVMS_INCD_TYPE_CDClick(TObject *Sender);
    void __fastcall BtnInfoCancelClick(TObject *Sender);
    void __fastcall TvList2CellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
          TShiftState AShift, bool &AHandled);
    void __fastcall BtnMissInfoClick(TObject *Sender);
    void __fastcall MnuListAddClick(TObject *Sender);
    void __fastcall MnuGisAddClick(TObject *Sender);
private:	// User declarations
    TcxDataController *m_pGDC;
    String             FTitle;
    int                FOcrrType;

    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   *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

public:
    void __fastcall InitForm();
    void __fastcall InitScreen();
    void __fastcall UpdateList();
    void __fastcall UpdateAutoList();
    bool __fastcall UpdateMissIncident(String AINCD_OCRR_ID);
    bool __fastcall InsertAutoIncident(String AINCD_OCRR_ID, String ARGST_DT);
    bool __fastcall UpdateAutoIncident(String AINCD_OCRR_ID, String ARGST_DT);

public:		// User declarations
    __fastcall TFRAMEIncidentProcess(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TFRAMEIncidentProcess *FRAMEIncidentProcess;
//---------------------------------------------------------------------------
#endif

