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

#ifndef CDSParkFH
#define CDSParkFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <stdio.h>
#include <ADODB.hpp>
#include <DB.hpp>
#include <SyncObjs.hpp>
#include <ExtCtrls.hpp>
#include <jpeg.hpp>
#include <GIFimg.hpp>
//---------------------------------------------------------------------------
#include "ITSLibF.h"
#include "CDSItsObjectF.h"
//---------------------------------------------------------------------------

//---------------------------------------------------------------------------
class TCDSPark
{
public:
    TCDSPark();
    ~TCDSPark();

public:
    bool       SUCCESS;

	AnsiString PRLT_CTLR_NMBR;
    AnsiString CNGT_DESC;
    int        CNGT_LEVL;

    int        WHOL_NPLS;
    int        GNRL_NPLS;
    int        LGVH_NPLS;
    int        HVVH_NPLS;
    int        EMVH_NPLS;
    int        HNDC_NPLS;
    int        WMON_NPLS;
    int        ELVH_NPLS;
    int        ETC_NPLS;
    int        CNGT_NPLS;

    int        TOTAL;
    int        GNRL_RMND_PRZN_NUM;  //	N	NUMBER(3)	Y	0		일반 잔여 주차구역 개수
    int        LGVH_RMND_PRZN_NUM;  //	N	NUMBER(3)	Y	0		경차 잔여 주차구역 개수
    int        HVVH_RMND_PRZN_NUM;  //	N	NUMBER(3)	Y	0		대형 잔여 주차구역 개수
    int        EMVH_RMND_PRZN_NUM;  //	N	NUMBER(3)	Y	0		긴급차량 잔여 주차구역 개수
    int        HNDC_RMND_PRZN_NUM;  //	N	NUMBER(3)	Y	0		장애인 잔여 주차구역 개수
    int        WMON_RMND_PRZN_NUM;  //	N	NUMBER(3)	Y	0		여성전용 잔여 주차구역 개수
    int        ELVH_RMND_PRZN_NUM;  //	N	NUMBER(3)	Y	0		전기차 잔여 주차구역 개수
    int        ETC_RMND_PRZN_NUM;   //	N	NUMBER(3)	Y	0		기타 잔여 주차구역 개수

    void Init();
    void CalcTotal();
    int GetGradeColor();
};
//---------------------------------------------------------------------------

//---------------------------------------------------------------------------
class TCDSParkManager : public TCDSItsObject
{
public:
    TCDSParkManager();
    ~TCDSParkManager();

private:

public:
    TItsMap<AnsiString, TCDSPark*> FLists;

public:
    int LoadFromDb(TADOConnection *ADbConn);
};
//---------------------------------------------------------------------------
extern TCDSParkManager *CDSParkManager;
//---------------------------------------------------------------------------

#endif
