public wsWorkState ws_selectDeviceWorkStates(int id, DateTime beginDate, DateTime endDate, out string OpStatus) { try { 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); OpStatus = "Выполнено"; return(WSt); } catch (Exception err) { OpStatus = err.ToString(); return(null); } }
public wsWorkState ws_selectDeviceWorkStates(int id, DateTime beginDate,DateTime endDate, out string OpStatus) { try { 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); OpStatus = "Выполнено"; return WSt; } catch (Exception err) { OpStatus = err.ToString(); return null; } }