/// <summary> /// 保存主管道操作数据 /// </summary> /// <param name="model"></param> /// <returns></returns> public CommonResult <MainPipelineInfo> AddOperatingData(MainPipelineInfo model) { var result = new CommonResult <MainPipelineInfo>(); try { var dbsession = new DBService <MainPipelineInfo>().DbSession; result.Data = dbsession.Insert(model); } catch (Exception ex) { Utils.Logger.Error(ex.Message); throw ex; } return(result); }
public CommonResult <MainPipelineInfo> AddOperatingData(string sessionId, MainPipelineInfo model) { try { var ret = ForPipelineServices.GetInstance(sessionId).AddOperatingData(model); //xxp 20170515 添加主管道阀门操作推送调度中心 if (ret.Data.DeveCode.Equals("MP001")) { DispatchCenterSerivce.DispatchArrangedCraftsProcessAsync(DisCenterHandler.ValveGroup, ValveGroupValue: ret.Data.PromptDes); } return(ret); } catch (Exception ex) { throw new FaultException <CustomFaultMessage>(new CustomFaultMessage() { ErrorCode = ex.HResult, Message = ex.Message, StackTrace = ex.StackTrace }, ex.Message); } }