public JsonResult RolesAssignUpdate(OrgRolesForm model) { model.inputUser = AppBusiness.loginModel.UserNo; JsonResponses responses = assignSDK.CreateOrgRoles(model); return(Json(responses, JsonRequestBehavior.AllowGet)); }
/// <summary> /// 机构角色修改 /// </summary> /// <param name="model"></param> /// <returns></returns> public int OrgRolesInsert(OrgRolesForm model) { int result = 0; //删除原有权限 DataHandleManager.Instance().PsOrgRolesHandle.DeleteOrgRoles(model.OrgNo); PsOrgRoles orgRoles = null; if (model.RolesNos != null) { foreach (var nos in model.RolesNos) { PsRoles roles = DataHandleManager.Instance().PsRolesHandle.GetRolesInfo(nos); if (roles != null) { orgRoles = new PsOrgRoles() { RolesNo = nos, OrgNo = model.OrgNo, InputUser = model.InputUser, InputTime = DateTime.Now, UpdateTime = DateTime.Now }; result += DataHandleManager.Instance().PsOrgRolesHandle.Insert(orgRoles); } } } return(result); }
public ActionResult <JsonResponses> CreateOrgRoles([FromBody] OrgRolesForm model) { var ResultCode = -1; DataHandleManager.Instance().PsOrganizationHandle.CheckOrgNoIsExist(model.orgNo); if (model.rolesNos != null) { DataHandleManager.Instance().PsRolesHandle.CheckRolesNosIsExist(model.rolesNos.ToList()); } ResultCode = DataHandleManager.Instance().PsOrgRolesHandle.OrgRolesInsert(model); return(ResultCode > 0 ? JsonResponses.Success : JsonResponses.Failed); }
/// <summary> /// 机构角色授权 /// </summary> /// <param name="model"></param> /// <returns></returns> public JsonResponses CreateOrgRoles(OrgRolesForm model) { try { RequestBase request = RequestBase.PostJson as RequestBase; request.Url = CreateOrgRolesUrl; request.SetJsonValue(model); return(sdkUtil.PostForVo(request)); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } return(JsonResponses.Failed); }
public JsonResult RolesAssignUpdate(OrgRolesForm model) { JsonResponses responses = assignSDK.CreateOrgRoles(model); return(Json(responses, JsonRequestBehavior.AllowGet)); }