public SystemMessage utl_Control_Permission_Save(utl_Control_Permission data) { SystemMessage systemMessage = new SystemMessage(); try { var param = new DynamicParameters(); param.Add("@ControlId", data.ControlId); param.Add("@GridColumnId", data.GridColumnId); param.Add("@PermissionId", data.PermissionId); param.Add("@PermissionType", data.PermissionType); param.Add("@IsActive", data.IsActive); param.Add("@CustomHtml", data.CustomHtml); param.Add("@DisplayOrder", data.DisplayOrder); param.Add("@DataCondition", data.DataCondition); UnitOfWork.ProcedureExecute("utl_Control_Permission_Save", param); systemMessage.IsSuccess = true; return(systemMessage); } catch (Exception e) { systemMessage.IsSuccess = false; systemMessage.Message = e.ToString(); return(systemMessage); } }
public ActionResult utl_Control_Permission_Save(utl_Control_Permission data) { var db = new utl_Control_Permission_DAL(); if (data.DisplayOrder == 0) { data.DisplayOrder = 1; } var result = db.utl_Control_Permission_Save(data); if (result.IsSuccess == true) { result.Message = AppRes.MS_Update_success; } else { result.Message = AppRes.MS_Update_error; } return(Content(JsonConvert.SerializeObject(new { result }))); }