PIS0030MF.cpp 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574
  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #include <winsock2.h>
  4. #include "ITSSkinF.h"
  5. #include "ITSUtilF.h"
  6. #include "AppGlobalF.h"
  7. #include "VitzroCommF.h"
  8. #include "CDSFacilityF.h"
  9. #pragma hdrstop
  10. #include "PIS0030MF.h"
  11. #include "SmartParkingOprF.h"
  12. //---------------------------------------------------------------------------
  13. #pragma package(smart_init)
  14. #pragma link "cxButtons"
  15. #pragma link "cxClasses"
  16. #pragma link "cxContainer"
  17. #pragma link "cxControls"
  18. #pragma link "cxCustomData"
  19. #pragma link "cxData"
  20. #pragma link "cxDataStorage"
  21. #pragma link "cxEdit"
  22. #pragma link "cxFilter"
  23. #pragma link "cxGraphics"
  24. #pragma link "cxGrid"
  25. #pragma link "cxGridCustomTableView"
  26. #pragma link "cxGridCustomView"
  27. #pragma link "cxGridLevel"
  28. #pragma link "cxGridTableView"
  29. #pragma link "cxGroupBox"
  30. #pragma link "cxLabel"
  31. #pragma link "cxLookAndFeelPainters"
  32. #pragma link "cxLookAndFeels"
  33. #pragma link "cxStyles"
  34. #pragma link "dxSkinBlack"
  35. #pragma link "dxSkinBlue"
  36. #pragma link "dxSkinsCore"
  37. #pragma link "dxSkinscxPCPainter"
  38. #pragma resource "*.dfm"
  39. TPIS0030M *PIS0030M = NULL;
  40. //---------------------------------------------------------------------------
  41. __fastcall TPIS0030M::TPIS0030M(TComponent* Owner)
  42. : TForm(Owner)
  43. {
  44. ITSSkin_Load(this);
  45. CMM_LoadForm(g_sFormsDir, this);
  46. FTitle = "주차장 제어";
  47. FReqSeq = 0;
  48. }
  49. //---------------------------------------------------------------------------
  50. /*
  51. * 닫기버튼 이나 x버튼 클릭시 공통으로 처리하는 로직이들어간다..
  52. * Form과 DataModule class를 delete시킨다.
  53. * arguments
  54. *
  55. * return
  56. * void
  57. */
  58. void __fastcall TPIS0030M::CommClose()
  59. {
  60. try
  61. {
  62. CMM_SaveForm(g_sFormsDir, this);
  63. }
  64. catch(...)
  65. {
  66. }
  67. }
  68. //---------------------------------------------------------------------------
  69. /*
  70. * Form을 보여줄때 호출되는 event 메서드이다.
  71. * arguments
  72. * Sender : event handler 객체
  73. * return
  74. * void
  75. */
  76. void __fastcall TPIS0030M::FormShow(TObject *Sender)
  77. {
  78. Refresh();
  79. FormInit();
  80. TmrShow->Enabled = true;
  81. }
  82. //---------------------------------------------------------------------------
  83. /*
  84. * form 초기화
  85. *
  86. * arguments
  87. *
  88. * return
  89. * void
  90. */
  91. void __fastcall TPIS0030M::FormInit()
  92. {
  93. LoadParkServerInfo();
  94. RefreshData();
  95. }
  96. //---------------------------------------------------------------------------
  97. /*
  98. * Form이 Show되고 난 후 최초 1회 수행되는 타이머 이벤트
  99. * arguments
  100. * Sender : event handler 객체
  101. * return
  102. * void
  103. */
  104. void __fastcall TPIS0030M::TmrShowTimer(TObject *Sender)
  105. {
  106. TmrShow->Enabled = false;
  107. }
  108. //---------------------------------------------------------------------------
  109. /*
  110. * Close 버튼 클릭 이벤트 핸들러
  111. * arguments
  112. * Sender : event handler 객체
  113. * return
  114. * void
  115. */
  116. void __fastcall TPIS0030M::BtnCloseClick(TObject *Sender)
  117. {
  118. Close();
  119. }
  120. //---------------------------------------------------------------------------
  121. void __fastcall TPIS0030M::FormClose(TObject *Sender, TCloseAction &Action)
  122. {
  123. CommClose();
  124. PIS0030M = NULL;
  125. Action = caFree;
  126. }
  127. //---------------------------------------------------------------------------
  128. void __fastcall TPIS0030M::BtnControlClick(TObject *Sender)
  129. {
  130. if (CTLR_MNGM_NMBR->Text == "")
  131. {
  132. Application->MessageBox(L"주차장을 선택하지 않았습니다.", FTitle.c_str(), MB_OK|MB_ICONWARNING|MB_APPLMODAL);
  133. CxList->SetFocus();
  134. return;
  135. }
  136. if (COMM_STATE->Text != "정상")
  137. {
  138. Application->MessageBox(L"통신상태가 정상이 아닌 주차장으로는 주차면수 초기화명령을 전송할 수 없습니다.", FTitle.c_str(), MB_OK|MB_ICONWARNING|MB_APPLMODAL);
  139. return;
  140. }
  141. if (Application->MessageBox(L"주차장 주차면수 초기화 명령 확인\r\n선택한 주차장에 대하여 주차면수 초기화 명령을 전송하시겠습니까??",
  142. FTitle.c_str(), MB_YESNO|MB_ICONQUESTION|MB_APPLMODAL) != IDYES) return;
  143. AnsiString sIpAddress = FIpAddress;
  144. int nPort = FPort;
  145. AnsiString sId;
  146. P_INIT_PARKING *pInfo;
  147. P_REQ_INIT_PARKING data;
  148. memset((char*) & data, 0x00, sizeof(P_REQ_INIT_PARKING));
  149. int ADataLen;
  150. data.Count = 1;
  151. pInfo = &data.Info[0];
  152. sId = CTLR_MNGM_NMBR->Text;
  153. sprintf(pInfo->Id, "%.*s", P_PARKING_ID_SIZE, sId.c_str()); // Id
  154. //pInfo->Total = (DWORD)StrToIntDef(Edit1->Text.Trim(), 0); // 총 주차여유 면수 주차장 전체 여유 면수 4 N
  155. pInfo->General = (DWORD)StrToIntDef(Edit2->Text.Trim(), 0); // 일반 주차여유 면수 일반 차량 주차 여유 면수 4 N
  156. pInfo->Disabled = (DWORD)StrToIntDef(Edit3->Text.Trim(), 0); // 장애인 주차여유 면수 장애인 차량 주차 여유 면수 4 N
  157. pInfo->Small = (DWORD)StrToIntDef(Edit4->Text.Trim(), 0); // 경차 주차여유 면수 경차 주차 여유 면수 4 N
  158. pInfo->Woman = (DWORD)StrToIntDef(Edit5->Text.Trim(), 0); // 여성전용 주차여유 면수 여성전용 주차여유 면수 4 N
  159. pInfo->Electric = (DWORD)StrToIntDef(Edit6->Text.Trim(), 0); // 전기차 주차여유 면수 전기차 전용 주차여유 면수 4 N
  160. pInfo->Total = pInfo->General +
  161. pInfo->Disabled +
  162. pInfo->Small +
  163. pInfo->Woman +
  164. pInfo->Electric;
  165. #if 0
  166. pInfo->Total = 200; // 총 주차여유 면수 주차장 전체 여유 면수 4 N
  167. pInfo->General = 0; // 일반 주차여유 면수 일반 차량 주차 여유 면수 4 N
  168. pInfo->Disabled = 14; // 장애인 주차여유 면수 장애인 차량 주차 여유 면수 4 N
  169. pInfo->Small = 10; // 경차 주차여유 면수 경차 주차 여유 면수 4 N
  170. pInfo->Woman = 22; // 여성전용 주차여유 면수 여성전용 주차여유 면수 4 N
  171. pInfo->Electric = 12; // 전기차 주차여유 면수 전기차 전용 주차여유 면수 4 N
  172. #endif
  173. ADataLen = 1 + (data.Count*sizeof(P_INIT_PARKING));
  174. P_INT_PACKET PKT;
  175. memset((char*) & PKT, 0x00, sizeof(P_INT_HEADER_SIZE));
  176. PKT.head.SendId = P_INT_ID_MAIN_OPER; /* 송신 시스템 ID */
  177. PKT.head.RecvId = P_INT_ID_PARK_SERVER; /* 수신 시스템 ID */
  178. PKT.head.TotalFrame = 1; /* 전체 프레임 갯수 */
  179. PKT.head.CurrentFrame = 1; /* 현재 프레임 번호 */
  180. PKT.head.Reserved = 0x00; /* Reserved */
  181. PKT.head.OPCode = INT_OP_PROC_EVENT; // INT_OP_COMM_COMMON; /* 명령어 */
  182. PKT.head.Length = htonl(ADataLen + 2); /* 데이터의 길이 */
  183. PKT.data.Data[0] = INT_OP_PARKING_INIT;
  184. PKT.data.Data[1] = 0X00;
  185. #if 0
  186. memcpy(&PKT.data.Data[2], (char*) & data, ADataLen);
  187. int result = CenterSendMessageB(sIpAddress, nPort, (char*) & PKT, P_INT_HEADER_SIZE + ADataLen + 2);
  188. Application->MessageBox(L"주차면수 초기화 제어명령을 전송 하였습니다.", FTitle.c_str(), MB_OK | MB_ICONINFORMATION | MB_APPLMODAL);
  189. #endif
  190. }
  191. //---------------------------------------------------------------------------
  192. /*
  193. * 메인폼에서 데이터를 수신시 발생하는 이벤트 핸들러
  194. * arguments
  195. *
  196. * return
  197. * void
  198. */
  199. void __fastcall TPIS0030M::OnMainFormMessage(TMessage &Msg)
  200. {
  201. #if 0
  202. IPCUDPMESSAGESTRUCT *pMsg; // 메시지 구조체
  203. IPCUDPDATASTRUCT *pPkt; // 내부 통신 패킷 구조체
  204. UNION_INT_DATA *pData; // 내부 통신 데이터부 구조체
  205. pMsg = (IPCUDPMESSAGESTRUCT*)Msg.LParam;
  206. pPkt = &pMsg->Frame;
  207. pData = &pPkt->Data.unData;
  208. switch(Msg.WParam)
  209. {
  210. case INT_OP_RSE_CONTROL_RES: /* 0xC1, RSE 제어정보 응답 */
  211. {
  212. INT_RSE_CONTROL_RES *pRseCtl;
  213. pRseCtl = (INT_RSE_CONTROL_RES*)pData;
  214. String sResId = String(pRseCtl->Head.RseId);
  215. String sResSeq = String(pRseCtl->Head.Seq);
  216. int nResult = pRseCtl->Data.ResType;
  217. try {
  218. TvResult->BeginUpdate();
  219. int nRowCnt = TvResult->ViewData->RecordCount;
  220. for (int ii = 0; ii < nRowCnt; ii++)
  221. {
  222. TcxCustomGridRow* ARow = FRAMEDsrcList1->TvList->ViewData->Rows[ii];
  223. if (((bool)ARow->Values[FRAMEDsrcList1->ColumnSel->Index]))
  224. {
  225. String sId = VarToStr(ARow->Values[ColResult1->Index]);
  226. String sSeq = VarToStr(ARow->Values[ColResult2->Index]);
  227. if (sResId == sId && sResSeq == sSeq) {
  228. String sResult = "Unknown";
  229. if (nResult == (int)INT_RSE_RESPONSE_SUCC)
  230. sResult = "성공";
  231. else if (nResult == (int)INT_RSE_RESPONSE_NACK)
  232. sResult = "실패";
  233. else if (nResult == (int)INT_RSE_RESPONSE_NONE)
  234. sResult = "응답없음";
  235. ARow->Values[ColResult4->Index] = sResult;
  236. break;
  237. }
  238. }
  239. }
  240. }
  241. __finally
  242. {
  243. TvResult->EndUpdate();
  244. }
  245. }
  246. break;
  247. default:
  248. break;
  249. } /* end switch */
  250. #endif
  251. }
  252. //---------------------------------------------------------------------------
  253. void __fastcall TPIS0030M::LoadParkServerInfo()
  254. {
  255. FIpAddress = "192.168.0.3";
  256. FPort = 4701;
  257. String sSvrID = "PARK02";
  258. String sIniFile = ChangeFileExt(ExtractFileName(Application->ExeName), ".ini");
  259. ReadConfigInfo(sIniFile, "APPLICATION", "PARKINGSERVERID", sSvrID);
  260. if (sSvrID == "")
  261. {
  262. sSvrID = "PARK02";
  263. }
  264. // 검색조건에 의한 링크 데이터 조회
  265. String sQry;
  266. TADOQuery *pADO = NULL;
  267. sQry = "SELECT A.* \r\n"
  268. " FROM TB_UNIT_SYST A \r\n"
  269. " WHERE A.SYST_ID = '" + sSvrID + "' \r\n";
  270. try
  271. {
  272. try
  273. {
  274. pADO = new TADOQuery(NULL);
  275. pADO->Close();
  276. pADO->Connection = ITSDb_GetConnection();
  277. pADO->SQL->Clear();
  278. pADO->SQL->Text = sQry;
  279. pADO->Open();
  280. for( ; !pADO->Eof; pADO->Next())
  281. {
  282. FIpAddress = pADO->FieldByName("SYST_IP_1")->AsString;
  283. FPort = pADO->FieldByName("PRGM_PORT")->AsString.ToIntDef(4701);
  284. }
  285. }
  286. catch(EDatabaseError &E)
  287. {
  288. throw Exception(String(E.ClassName()) + E.Message);
  289. }
  290. catch(Exception &exception)
  291. {
  292. throw Exception(String(exception.ClassName()) + exception.Message);
  293. }
  294. catch(...)
  295. {
  296. throw Exception(FrmLang->lblDbErr->Caption);//"[주차서버정보조회] 알수없는 DB 오류가 발생하였습니다.");
  297. }
  298. }
  299. __finally
  300. {
  301. if (pADO)
  302. {
  303. pADO->Close();
  304. delete pADO;
  305. }
  306. }
  307. }
  308. //---------------------------------------------------------------------------
  309. void __fastcall TPIS0030M::RefreshData()
  310. {
  311. // 검색조건에 의한 링크 데이터 조회
  312. String sQry;
  313. TADOQuery *pADO = NULL;
  314. ClearForm();
  315. #ifdef REAL_DATA_YN
  316. sQry = "SELECT A.CTLR_MNGM_NMBR, A.CTLR_MNGM_NM, A.REAL_DATA_YN, \r\n"
  317. " B.FLOR_NMBR AS FLORID, B.FLOR_NM AS FLORNM, \r\n"
  318. " H.* \r\n"
  319. " FROM TB_PRLT_CTLR A, \r\n"
  320. " TB_PRLT_FLOR B, \r\n"
  321. " TB_PRLT_RT_INFR H \r\n"
  322. " WHERE A.CTLR_MNGM_NMBR = B.CTLR_MNGM_NMBR \r\n"
  323. " AND B.CTLR_MNGM_NMBR = H.CTLR_MNGM_NMBR \r\n"
  324. " AND B.FLOR_NMBR = H.FLOR_NMBR \r\n"
  325. " ORDER BY A.CTLR_MNGM_NMBR, B.FLOR_NMBR, H.UPDT_DT \r\n";
  326. #else
  327. sQry = "SELECT A.CTLR_MNGM_NMBR, A.CTLR_MNGM_NM, 'Y' AS REAL_DATA_YN, \r\n"
  328. " B.FLOR_NMBR AS FLORID, B.FLOR_NM AS FLORNM, \r\n"
  329. " H.* \r\n"
  330. " FROM TB_PRLT_CTLR A, \r\n"
  331. " TB_PRLT_FLOR B, \r\n"
  332. " TB_PRLT_RT_INFR H \r\n"
  333. " WHERE A.CTLR_MNGM_NMBR = B.CTLR_MNGM_NMBR \r\n"
  334. " AND B.CTLR_MNGM_NMBR = H.CTLR_MNGM_NMBR \r\n"
  335. " AND B.FLOR_NMBR = H.FLOR_NMBR \r\n"
  336. " ORDER BY A.CTLR_MNGM_NMBR, B.FLOR_NMBR, H.UPDT_DT \r\n";
  337. #endif
  338. CMM_ClearGridTableView(TvList);
  339. try
  340. {
  341. int nRow;
  342. TvList->BeginUpdate();
  343. try
  344. {
  345. int nORD;
  346. pADO = new TADOQuery(NULL);
  347. pADO->Close();
  348. pADO->Connection = ITSDb_GetConnection();
  349. pADO->SQL->Clear();
  350. pADO->SQL->Text = sQry;
  351. pADO->Open();
  352. for( ; !pADO->Eof; pADO->Next())
  353. {
  354. //실시간주차정보제공 하는 주차장만 제어가능
  355. String REAL_DATA_YN = pADO->FieldByName("REAL_DATA_YN")->AsString;
  356. if (REAL_DATA_YN != "Y") continue;
  357. nRow = TvList->DataController->AppendRecord();
  358. String CTLR_MNGM_NMBR = pADO->FieldByName("CTLR_MNGM_NMBR")->AsString;
  359. TvList->DataController->Values[nRow][Col11->Index] = CTLR_MNGM_NMBR;
  360. TvList->DataController->Values[nRow][Col12->Index] = pADO->FieldByName("CTLR_MNGM_NM")->AsString;
  361. TvList->DataController->Values[nRow][Col00->Index] = pADO->FieldByName("FLORID")->AsString;
  362. TvList->DataController->Values[nRow][Col01->Index] = pADO->FieldByName("FLORNM")->AsString;
  363. //TvList->DataController->Values[nRow][Col02->Index] = pADO->FieldByName("UPDT_DT")->AsString;
  364. TvList->DataController->Values[nRow][Col02->Index] = ITSUtil_StrToDateTime(pADO->FieldByName("UPDT_DT")->AsString).FormatString(STR_DATETIME);
  365. TvList->DataController->Values[nRow][Col03->Index] = pADO->FieldByName("GNRL_RMND_PRZN_NUM")->AsString;
  366. TvList->DataController->Values[nRow][Col04->Index] = pADO->FieldByName("LGVH_RMND_PRZN_NUM")->AsString;
  367. TvList->DataController->Values[nRow][Col05->Index] = pADO->FieldByName("HVVH_RMND_PRZN_NUM")->AsString;
  368. TvList->DataController->Values[nRow][Col06->Index] = pADO->FieldByName("EMVH_RMND_PRZN_NUM")->AsString;
  369. TvList->DataController->Values[nRow][Col07->Index] = pADO->FieldByName("HNDC_RMND_PRZN_NUM")->AsString;
  370. TvList->DataController->Values[nRow][Col08->Index] = pADO->FieldByName("WMON_RMND_PRZN_NUM")->AsString;
  371. TvList->DataController->Values[nRow][Col09->Index] = pADO->FieldByName("ETC_RMND_PRZN_NUM")->AsString;
  372. TItsFacility *pObj = ItsFacilityManager->FLists.Find(CTLR_MNGM_NMBR);
  373. if (pObj)
  374. {
  375. if (pObj->FComm == "0")
  376. TvList->DataController->Values[nRow][Col10->Index] = "장애";
  377. else
  378. TvList->DataController->Values[nRow][Col10->Index] = "정상";
  379. }
  380. else
  381. {
  382. TvList->DataController->Values[nRow][Col10->Index] = FrmLang->lblUnknown->Caption;//"알수없음";
  383. }
  384. }
  385. }
  386. catch(EDatabaseError &E)
  387. {
  388. throw Exception(String(E.ClassName()) + E.Message);
  389. }
  390. catch(Exception &exception)
  391. {
  392. throw Exception(String(exception.ClassName()) + exception.Message);
  393. }
  394. catch(...)
  395. {
  396. throw Exception(FrmLang->lblDbErr->Caption);//"[주차현황조회] 알수없는 DB 오류가 발생하였습니다.");
  397. }
  398. }
  399. __finally
  400. {
  401. if (pADO)
  402. {
  403. pADO->Close();
  404. delete pADO;
  405. }
  406. TvList->EndUpdate();
  407. //cxGroupBox3->Caption = "▶ 주차정보";// (최종가공시각: " + FRAMETrafficLinkList1->FLastAnsTime + ")";
  408. }
  409. }
  410. //---------------------------------------------------------------------------
  411. void __fastcall TPIS0030M::Edit1KeyPress(TObject *Sender, wchar_t &Key)
  412. {
  413. if (Key > '9' || Key < '0')
  414. {
  415. if (Key != VK_BACK && Key != VK_TAB && Key != VK_DELETE)
  416. Key = 0;
  417. }
  418. }
  419. //---------------------------------------------------------------------------
  420. void __fastcall TPIS0030M::BtnSearchClick(TObject *Sender)
  421. {
  422. Application->ProcessMessages();
  423. TSqlCursor sqlCrs((TControl*)BtnSearch);
  424. RefreshData();
  425. }
  426. //---------------------------------------------------------------------------
  427. void __fastcall TPIS0030M::Col10CustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas,
  428. TcxGridTableDataCellViewInfo *AViewInfo, bool &ADone)
  429. {
  430. if (AViewInfo->Value == "정상")
  431. {
  432. ACanvas->Canvas->Brush->Color = clWhite;
  433. ACanvas->Canvas->Font->Color = clBlack;
  434. }
  435. else
  436. {
  437. ACanvas->Canvas->Brush->Color = clRed;
  438. ACanvas->Canvas->Font->Color = clWhite;
  439. }
  440. }
  441. //---------------------------------------------------------------------------
  442. void __fastcall TPIS0030M::TvListCellClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
  443. TMouseButton AButton, TShiftState AShift,
  444. bool &AHandled)
  445. {
  446. DisplayInfo();
  447. }
  448. //---------------------------------------------------------------------------
  449. void __fastcall TPIS0030M::TvListFocusedRecordChanged(TcxCustomGridTableView *Sender,
  450. TcxCustomGridRecord *APrevFocusedRecord, TcxCustomGridRecord *AFocusedRecord,
  451. bool ANewItemRecordFocusingChanged)
  452. {
  453. DisplayInfo();
  454. }
  455. //---------------------------------------------------------------------------
  456. void __fastcall TPIS0030M::DisplayInfo()
  457. {
  458. ClearForm();
  459. if (TvList->ViewData->RecordCount <= 0) return;
  460. int nIndex = TvList->DataController->FocusedRecordIndex;
  461. if (nIndex < 0) return;
  462. CTLR_MNGM_NMBR->Text = VarToStr(TvList->DataController->Values[nIndex][Col11->Index]);
  463. CTLR_MNGM_NM->Text = VarToStr(TvList->DataController->Values[nIndex][Col12->Index]);
  464. COMM_STATE->Text = VarToStr(TvList->DataController->Values[nIndex][Col10->Index]);
  465. #if 0
  466. int GNRL_RMND_PRZN_NUM = pObj->GENERAL; // N NUMBER(3) Y 0 일반 잔여 주차구역 개수
  467. int LGVH_RMND_PRZN_NUM = pObj->SMALL; // N NUMBER(3) Y 0 경차 잔여 주차구역 개수
  468. int HVVH_RMND_PRZN_NUM = 0; // N NUMBER(3) Y 0 대형 잔여 주차구역 개수
  469. int EMVH_RMND_PRZN_NUM = 0; // N NUMBER(3) Y 0 긴급차량 잔여 주차구역 개수
  470. int HNDC_RMND_PRZN_NUM = pObj->DISABLED; // N NUMBER(3) Y 0 장애인 잔여 주차구역 개수
  471. int WMON_RMND_PRZN_NUM = pObj->WOMAN; // N NUMBER(3) Y 0 여성전용 잔여 주차구역 개수
  472. int ETC_RMND_PRZN_NUM = pObj->ELECTRIC; // N NUMBER(3) Y 0 기타 잔여 주차구역 개수
  473. #endif
  474. Edit1->Text = "0";//VarToStr(TvList->DataController->Values[nIndex][Col09->Index]);
  475. Edit2->Text = VarToStr(TvList->DataController->Values[nIndex][Col03->Index]);
  476. Edit3->Text = VarToStr(TvList->DataController->Values[nIndex][Col07->Index]);
  477. Edit4->Text = VarToStr(TvList->DataController->Values[nIndex][Col04->Index]);
  478. Edit5->Text = VarToStr(TvList->DataController->Values[nIndex][Col08->Index]);
  479. Edit6->Text = VarToStr(TvList->DataController->Values[nIndex][Col09->Index]);
  480. if (COMM_STATE->Text == "정상")
  481. BtnControl->Enabled = true;
  482. else
  483. BtnControl->Enabled = false;
  484. }
  485. //---------------------------------------------------------------------------
  486. void __fastcall TPIS0030M::ClearForm()
  487. {
  488. CTLR_MNGM_NMBR->Text = "";
  489. CTLR_MNGM_NM->Text = "";
  490. COMM_STATE->Text = "-";
  491. #if 0
  492. Edit1// 총 주차여유 면수 주차장 전체 여유 면수 4 N
  493. Edit2// 일반 주차여유 면수 일반 차량 주차 여유 면수 4 N
  494. Edit3// 장애인 주차여유 면수 장애인 차량 주차 여유 면수 4 N
  495. Edit4// 경차 주차여유 면수 경차 주차 여유 면수 4 N
  496. Edit5// 여성전용 주차여유 면수 여성전용 주차여유 면수 4 N
  497. Edit6// 전기차 주차여유 면수 전기차 전용 주차여유 면수 4 N
  498. #endif
  499. Edit1->Text = "0";
  500. Edit2->Text = "0";
  501. Edit3->Text = "0";
  502. Edit4->Text = "0";
  503. Edit5->Text = "0";
  504. Edit6->Text = "0";
  505. BtnControl->Enabled = false;
  506. }
  507. //---------------------------------------------------------------------------