static void Main(string[] args) { //DateTime beginDate = DateTime.Now.AddDays(-7); //DateTime endDate = DateTime.Now; //int id = 77; //wsWorkState WSt = new wsWorkState(); //WorkDataManager WDM = new WorkDataManager(); //WSt.list_SCADAMessages = WDM.selectDevWorkStates(id, beginDate, endDate); //WSt.ID = id; //WSt.startDate = beginDate; //WSt.finishDate = endDate; //WSt.list_StatesDurations = WDM.selectDevWorkStatesDuration(id, beginDate, endDate); DeviceDataManager DDM = new DeviceDataManager(); wsPassportExtended P_EX = new wsPassportExtended(); P_EX = DDM.selectPasport(77); P_EX.DevPath = DDM.selectDeviceParents(P_EX.DevTypeID); P_EX.DevPlacePath = DDM.selectPlaceParents(P_EX.DevPlaceID); }
public string ws_selectDeviceParents(int?ID, out string OpStatus) { try { DeviceDataManager DDM = new DeviceDataManager(); OpStatus = "Выполнено"; return(DDM.selectDeviceParents(ID)); } catch (Exception err) { OpStatus = err.Message.ToString(); return(null); } }
public List <wsBaseItem> ws_selectTreeItemsList(int?ID, out string OpStatus, out string Path) { try { DeviceDataManager DDM = new DeviceDataManager(); OpStatus = Resources.Messages.m_OpStatusDone; Path = DDM.selectDeviceParents(ID); return(DDM.selectItemsList(ID)); } catch (Exception err) { OpStatus = err.Message.ToString(); Path = ""; return(null); } }
public wsPassportExtended ws_selectPassport(int ID, out string OpStatus) { try { wsPassportExtended P = new wsPassportExtended(); DeviceDataManager DDM = new DeviceDataManager(); P = DDM.selectPasport(ID); P.DevPath = DDM.selectDeviceParents(P.DevTypeID); P.DevPlacePath = DDM.selectPlaceParents(P.DevPlaceID); OpStatus = Resources.Messages.m_OpStatusDone; return(P); } catch (Exception err) { OpStatus = err.ToString(); return(null); } }
public wsPassportExtended ws_selectPassport_EX(int?ID, out string OpStatus) { try { wsPassportExtended P_EX = new wsPassportExtended(); CatalogsDataManager CDM = new CatalogsDataManager(); DeviceDataManager DDM = new DeviceDataManager(); if (ID != null) { P_EX = DDM.selectPasport((int)ID); P_EX.DevPath = DDM.selectDeviceParents(P_EX.DevTypeID); P_EX.DevPlacePath = DDM.selectPlaceParents(P_EX.DevPlaceID); } P_EX.list_Producers = CDM.GetProducerList(); DBTree DBT = new DBTree(2); // 2 = models tree //wsNode NNODE = new wsNode(DBTREE.GetAnyNodeinDB); P_EX.tbl_Models = DBT.DBDATA; List <string> s = new List <string>(); List <wsBaseItem> blist = new List <wsBaseItem>(); blist = DDM.selectItemsList(null); foreach (wsBaseItem b in blist) { s.Add(b.Description); } P_EX.helper_DevDescr = s; OpStatus = Resources.Messages.m_OpStatusDone; return(P_EX); } catch (Exception err) { OpStatus = err.ToString(); return(null); } }
public string ws_selectDeviceParents(int? ID, out string OpStatus) { try { DeviceDataManager DDM = new DeviceDataManager(); OpStatus = "Выполнено"; return DDM.selectDeviceParents(ID); } catch (Exception err) { OpStatus = err.Message.ToString(); return null; } }
public wsPassportExtended ws_selectPassport_EX(int? ID, out string OpStatus) { try { wsPassportExtended P_EX = new wsPassportExtended(); CatalogsDataManager CDM = new CatalogsDataManager(); DeviceDataManager DDM = new DeviceDataManager(); if (ID != null) { P_EX = DDM.selectPasport((int)ID); P_EX.DevPath = DDM.selectDeviceParents(P_EX.DevTypeID); P_EX.DevPlacePath = DDM.selectPlaceParents(P_EX.DevPlaceID); } P_EX.list_Producers = CDM.GetProducerList(); DBTree DBT = new DBTree(2); // 2 = models tree //wsNode NNODE = new wsNode(DBTREE.GetAnyNodeinDB); P_EX.tbl_Models = DBT.DBDATA; List<string> s = new List<string>(); List<wsBaseItem> blist = new List<wsBaseItem>(); blist = DDM.selectItemsList(null); foreach (wsBaseItem b in blist) { s.Add(b.Description); } P_EX.helper_DevDescr = s; OpStatus = Resources.Messages.m_OpStatusDone; return P_EX; } catch (Exception err) { OpStatus = err.ToString(); return null; } }
public wsPassportExtended ws_selectPassport(int ID, out string OpStatus) { try { wsPassportExtended P = new wsPassportExtended(); DeviceDataManager DDM = new DeviceDataManager(); P = DDM.selectPasport(ID); P.DevPath = DDM.selectDeviceParents(P.DevTypeID); P.DevPlacePath = DDM.selectPlaceParents(P.DevPlaceID); OpStatus = Resources.Messages.m_OpStatusDone; return P; } catch (Exception err) { OpStatus = err.ToString(); return null; } }
public List<wsBaseItem> ws_selectTreeItemsList(int? ID, out string OpStatus, out string Path) { try { DeviceDataManager DDM = new DeviceDataManager(); OpStatus = Resources.Messages.m_OpStatusDone; Path = DDM.selectDeviceParents(ID); return DDM.selectItemsList(ID); } catch (Exception err) { OpStatus = err.Message.ToString(); Path = ""; return null; } }