CDSUtisF.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. //---------------------------------------------------------------------------
  2. #ifndef CDSUtisFH
  3. #define CDSUtisFH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <ADODB.hpp>
  7. #include <DB.hpp>
  8. #include "cxCustomData.hpp"
  9. #include "ITSLibF.h"
  10. //---------------------------------------------------------------------------
  11. /*
  12. * Utis class
  13. */
  14. class TItsUtis
  15. {
  16. public:
  17. TItsUtis();
  18. virtual ~TItsUtis();
  19. void Clear();
  20. private:
  21. bool FModified;
  22. bool FCompleted;
  23. public:
  24. int FGridIndex; // 메인폼에 뿌려지는 그리드 인덱스
  25. void SetValue(String &AOrgValue, String AValue);
  26. protected:
  27. public:
  28. __property bool Modified = {read = FModified};
  29. __property bool Completed = {read = FCompleted, write = FCompleted};
  30. __property int GridIndex = {read = FGridIndex, write = FGridIndex };
  31. };
  32. //---------------------------------------------------------------------------
  33. #define MAX_UTIS_RUN 3
  34. typedef struct
  35. {
  36. String Status[MAX_UTIS_RUN];
  37. int TotCnt[MAX_UTIS_RUN];
  38. int RunCnt[MAX_UTIS_RUN];
  39. String LastTime[MAX_UTIS_RUN];
  40. } UTIS_RUN;
  41. /*
  42. * Utis Manager
  43. */
  44. class TItsUtisManager
  45. {
  46. public:
  47. TItsUtisManager();
  48. virtual ~TItsUtisManager();
  49. public:
  50. String CenterId;
  51. UTIS_RUN UtisRun;
  52. int FTotCctvCnt;
  53. int RseRun[MAX_UTIS_RUN];
  54. TItsMap<String, TItsUtis*> FLists;
  55. public:
  56. void SetCenterId(String ACenterId);
  57. bool LoadFromDb(TADOConnection *ADbConn=NULL);
  58. bool LoadUtisMaster(TADOConnection *ADbConn=NULL);
  59. bool LoadUtisStatusFromDb(TADOConnection *ADbConn=NULL);
  60. bool LoadUtisStatusUtisRun(TADOConnection *ADbConn=NULL);
  61. bool LoadUtisStatusRseRun(TADOConnection *ADbConn=NULL);
  62. };
  63. //---------------------------------------------------------------------------
  64. extern TItsUtisManager *ItsUtisManager;
  65. //---------------------------------------------------------------------------
  66. #endif