///<summary> ///修改: ///</summary> /// <param name="model">要修改的model</param> /// <returns>受影响的行数</returns> public Result <int> UpdateCustomProperty(EPM_CustomProperty model) { Result <int> result = new Result <int>(); try { var rows = DataOperateBusiness <EPM_CustomProperty> .Get().Update(model); result.Data = rows; result.Flag = EResultFlag.Success; //WriteLog(WebModule.CustomProperty.GetText(), SystemRight.Modify.GetText(), "修改: " + model.Id); } catch (Exception ex) { result.Data = -1; result.Flag = EResultFlag.Failure; result.Exception = new ExceptionEx(ex, "UpdateCustomProperty"); } return(result); }
//[AuthCheck(Module = WebModule.Bim, Right = SystemRight.Add)] public ActionResult AddCustom(string externalId, string propertyKey, string propertyValue) { Result <int> result = new Result <int>(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { var bim = proxy.GetBimModel(externalId.Split('_')[0].ToLongReq()); EPM_CustomProperty model = new EPM_CustomProperty(); model.externalId = externalId.Split('_')[1]; model.BimId = externalId.Split('_')[0].ToLongReq(); model.PropertyKey = propertyKey; model.PropertyValue = propertyValue; model.PropertyType = "custom"; model.ProjectId = bim.Data.ProjectId; model.ProjectName = bim.Data.ProjectName; model.IsDelete = false; result = proxy.AddCustomProperty(model); } return(Json(result.ToResultView())); }
///<summary> ///添加: ///</summary> /// <param name="model">要添加的model</param> /// <returns>受影响的行数</returns> public Result <int> AddCustomProperty(EPM_CustomProperty model) { Result <int> result = new Result <int>(); try { model = base.SetCurrentUser(model); var rows = DataOperateBusiness <EPM_CustomProperty> .Get().Add(model); result.Data = rows; result.Flag = EResultFlag.Success; //WriteLog(WebModule.CustomProperty.GetText(), SystemRight.Add.GetText(), "新增: " + model.Id); } catch (Exception ex) { result.Data = -1; result.Flag = EResultFlag.Failure; result.Exception = new ExceptionEx(ex, "AddCustomProperty"); } return(result); }