public OutputParam CalcWorkTime(string data) { InputParam inputParam = Newtonsoft.Json.JsonConvert.DeserializeObject <InputParam>(data); OutputParam result = new OutputParam(); try { DBWorkTime dbWorkTime = new DBWorkTime(); dbWorkTime.CalcWorkTime(inputParam.TrainPlanGUID); } catch (Exception ex) { result.result = "1"; result.resultStr = ex.Message.ToString(); } return(result); }
public OutputParam GetWorkTime(string data) { InputParam inputParam = Newtonsoft.Json.JsonConvert.DeserializeObject <InputParam>(data); OutputParam result = new OutputParam(); OutputWorkTime outputWorkTime = new OutputWorkTime(); try { result.data = outputWorkTime; DBWorkTime dbWorkTime = new DBWorkTime(); outputWorkTime.workTime = dbWorkTime.GetWorkTime(inputParam.TrainPlanGUID); outputWorkTime.bExist = outputWorkTime.workTime != null; } catch (Exception ex) { result.result = "1"; result.resultStr = ex.Message.ToString(); } return(result); }