public ActionResult EditAuthorityOperationGroup(EditAuthorityOperationGroupViewModel authorityOperationGroup) { if (IsPost) { SaveAuthorityOperationGroupCmdDto saveInfo = new SaveAuthorityOperationGroupCmdDto() { AuthorityOperationGroup = authorityOperationGroup.MapTo <AuthorityOperationGroupCmdDto>() }; var saveResult = authService.SaveAuthorityOperationGroup(saveInfo); var ajaxResult = AjaxResult.CopyFromResult(saveResult); ajaxResult.Data = saveResult.Data?.MapTo <AuthorityOperationGroupViewModel>(); ajaxResult.SuccessClose = true; return(Json(ajaxResult)); } else if (!(authorityOperationGroup.SysNo <= 0)) { AuthorityOperationGroupFilterDto filter = new AuthorityOperationGroupFilterDto() { SysNos = new List <long>() { authorityOperationGroup.SysNo } }; authorityOperationGroup = authService.GetAuthorityOperationGroup(filter).MapTo <EditAuthorityOperationGroupViewModel>(); } return(View(authorityOperationGroup)); }
/// <summary> /// 根据授权操作分组查询条件生成查询对象 /// </summary> /// <param name="filter">查询条件</param> /// <returns></returns> IQuery CreateAuthorityOperationGroupQueryObject(AuthorityOperationGroupFilterDto filter) { if (filter == null) { return(null); } IQuery query = QueryFactory.Create <AuthorityOperationGroupQuery>(filter); if (!filter.SysNos.IsNullOrEmpty()) { query.In <AuthorityOperationGroupQuery>(c => c.SysNo, filter.SysNos); } if (!filter.ExcludeSysNos.IsNullOrEmpty()) { query.NotIn <AuthorityOperationGroupQuery>(c => c.SysNo, filter.ExcludeSysNos); } if (!filter.Name.IsNullOrEmpty()) { query.Equal <AuthorityOperationGroupQuery>(c => c.Name, filter.Name); } if (filter.Sort.HasValue) { query.Equal <AuthorityOperationGroupQuery>(c => c.Sort, filter.Sort.Value); } if (filter.Parent.HasValue) { query.Equal <AuthorityOperationGroupQuery>(c => c.Parent, filter.Parent.Value); } if (filter.Root.HasValue) { query.Equal <AuthorityOperationGroupQuery>(c => c.Root, filter.Root.Value); } if (filter.Level.HasValue) { query.Equal <AuthorityOperationGroupQuery>(c => c.Level, filter.Level.Value); } if (filter.Status.HasValue) { query.Equal <AuthorityOperationGroupQuery>(c => c.Status, filter.Status.Value); } if (!filter.Remark.IsNullOrEmpty()) { query.Equal <AuthorityOperationGroupQuery>(c => c.Remark, filter.Remark); } return(query); }
/// <summary> /// 获取授权操作组分页 /// </summary> /// <param name="filter">查询对象</param> /// <returns></returns> public IPaging <AuthorityOperationGroupDto> GetAuthorityOperationGroupPaging(AuthorityOperationGroupFilterDto filter) { return(authBusiness.GetAuthorityOperationGroupPaging(filter)); }
/// <summary> /// 获取授权操作组列表 /// </summary> /// <param name="filter">查询对象</param> /// <returns></returns> public List <AuthorityOperationGroupDto> GetAuthorityOperationGroupList(AuthorityOperationGroupFilterDto filter) { return(authBusiness.GetAuthorityOperationGroupList(filter)); }
/// <summary> /// 获取授权操作组 /// </summary> /// <param name="filter">查询对象</param> /// <returns></returns> public AuthorityOperationGroupDto GetAuthorityOperationGroup(AuthorityOperationGroupFilterDto filter) { return(authBusiness.GetAuthorityOperationGroup(filter)); }
/// <summary> /// 获取授权操作组分页 /// </summary> /// <param name="filter">查询对象</param> /// <returns></returns> public IPaging <AuthorityOperationGroupDto> GetAuthorityOperationGroupPaging(AuthorityOperationGroupFilterDto filter) { var authorityOperationGroupPaging = authorityOperationGroupService.GetAuthorityOperationGroupPaging(CreateAuthorityOperationGroupQueryObject(filter)); return(authorityOperationGroupPaging.ConvertTo <AuthorityOperationGroupDto>()); }
/// <summary> /// 获取授权操作组列表 /// </summary> /// <param name="filter">查询对象</param> /// <returns></returns> public List <AuthorityOperationGroupDto> GetAuthorityOperationGroupList(AuthorityOperationGroupFilterDto filter) { var authorityOperationGroupList = authorityOperationGroupService.GetAuthorityOperationGroupList(CreateAuthorityOperationGroupQueryObject(filter)); return(authorityOperationGroupList.Select(c => c.MapTo <AuthorityOperationGroupDto>()).ToList()); }
/// <summary> /// 获取授权操作组 /// </summary> /// <param name="filter">查询对象</param> /// <returns></returns> public AuthorityOperationGroupDto GetAuthorityOperationGroup(AuthorityOperationGroupFilterDto filter) { var authorityOperationGroup = authorityOperationGroupService.GetAuthorityOperationGroup(CreateAuthorityOperationGroupQueryObject(filter)); return(authorityOperationGroup.MapTo <AuthorityOperationGroupDto>()); }
public IActionResult SearchAuthorityOperationGroup(AuthorityOperationGroupFilterDto filter) { var authorityOperationGroups = authService.GetAuthorityOperationGroupList(filter).Select(c => c.MapTo <AuthorityOperationGroupViewModel>()).OrderBy(r => r.Sort).ToList(); return(Json(authorityOperationGroups)); }