internal void AddDBConnection(ConnectionVO connVO) { //잘못된 URL형식 걸러내기 if (!(connVO.ServiceURL.Contains("http://")) || (connVO.ServiceURL.Replace("http://", string.Empty).Length == 0)) { return; } try { IDBService DBModel = new PostgresSQLDBServicecs(connVO); ConnDic.Add(connVO.ServiceURL, DBModel); ActiveDBKeyList.Add(connVO.ServiceURL); } catch (Exception ex) { LogController.getInstance().WriteLogFile(ex.Message); } }
private DBController(IList <ConnectionVO> connInfoList) { LoadDBTools(); if (ConnDic == null) { ConnDic = new Dictionary <string, DBService>(); ActiveDBKeyList = new StringCollection(); } foreach (ConnectionVO connVO in connInfoList) { try { DBService DBModel = new DBService(connVO); ConnDic.Add(connVO.ServiceURL, DBModel); ActiveDBKeyList.Add(connVO.ServiceURL); } catch (Exception ex) { LogController.getInstance().WriteLogFile(ex.Message); continue; } } //End of Foreach } //End of ctor