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

#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 PRK_PLCE_NMBR;
	AnsiString PRK_PLCE_MANAGE_NO;
	AnsiString PRK_PLCE_NM;
	AnsiString VMS_DSPL_NM;
    AnsiString CMNC_STTS_CD;

    AnsiString PARKING_CGS_STTUS_DESC;

    int        REG_PRK_CMPRT_CO;
    int        RUN_PRK_CMPRT_CO;

    int        PARKING_CGS_STTUS;
    int        REMNDR_PRK_CMPRT_CO;

    void Init();
    void CalcCgsSttus();
    int GetGradeColor();
    AnsiString GetParkName();
    AnsiString GetCountText(AnsiString ATxt, int ACount);
    AnsiString GetRemainCo(AnsiString ATxt);
    AnsiString GetTotalCo(AnsiString ATxt);
    AnsiString GetCgsSttus();
};
//---------------------------------------------------------------------------

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

private:

public:
    TItsMap<AnsiString, TCDSPark*> FLists;

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

#endif
