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

#ifndef CDSColSysFH
#define CDSColSysFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <ADODB.hpp>
#include <DB.hpp>
#include "cxCustomData.hpp"
#include "ITSLibF.h"
//---------------------------------------------------------------------------

#define MAX_COLSYS  15

/*
*  ColSys class
*/
class TItsColSys
{
public:
    TItsColSys();
    virtual ~TItsColSys();
    void Clear();
private:
    bool    FCompleted;
    int     FEditMode;
	int     FGridIndex;

public:
    String  CLCT_SYST_CD;   //VARCHAR2(7)	N 수집 시스템 코드
    String  CLCT_SYST_NMBR; //NUMBER(2)	    Y 수집 시스템 번호
    String  CLCT_SYST_NM;   //VARCHAR2(30)	N 수집 시스템 명
    String  CLCT_SYST_EXPL; //VARCHAR2(100)	Y 수집 시스템 설명
    String  CLCT_MAX_NUM;   //NUMBER(7)	Y	0 수집 최대 개수
    String  USE_YN;         //CHAR(1)	Y	'N'		사용 여부

    String  MEM_DEL;
    
public:
    __property bool   Completed = {read = FCompleted, write = FCompleted};
	__property int    EditMode  = {read = FEditMode,  write = FEditMode };
	__property int    GridIndex = {read = FGridIndex, write = FGridIndex };
};
//---------------------------------------------------------------------------

/*
* ColSys Manager
*/
class TItsColSysManager
{
public:
    TItsColSysManager();
    virtual ~TItsColSysManager();

public:
    TItsMap<String, TItsColSys*>   FLists;

public:
    bool LoadFromDb(TADOConnection *ADbConn=NULL);
};
//---------------------------------------------------------------------------
extern TItsColSysManager *ItsColSysManager;
//---------------------------------------------------------------------------

#endif

