/// <summary> /// 修改安全标准 /// </summary> /// <param name="safetystandard"></param> /// <returns></returns> public ActionResult <bool> EditSafetyStandard(SafetyStandardEdit safetystandard) { try { var dbsafetystandard = _rpssafetystandard.GetModel(safetystandard.ID); if (dbsafetystandard == null) { throw new Exception("未找到所需修改安全标准"); } var check = _rpsdssd.Any(p => p.SafetyStandardID == safetystandard.ID); if (check) { throw new Exception("该安全标准已配置在风险点下,无法修改!"); } var _dbsafetystandard = safetystandard.CopyTo <Basic_SafetyStandard>(dbsafetystandard); _rpssafetystandard.Update(dbsafetystandard); _work.Commit(); return(new ActionResult <bool>(true)); } catch (Exception ex) { return(new ActionResult <bool>(ex)); } }
public ActionResult <bool> EditSafetyStandard(SafetyStandardEdit safetystandard) { LogContent = "修改了安全标准,参数源:" + JsonConvert.SerializeObject(safetystandard); return(bll.EditSafetyStandard(safetystandard)); }