public List <IviewTree> GetPermissionTree(string userId) { var seleteids = _permissionRoleUserOrganizationUnit.GetAll().Where(u => u.UserId == userId).Select(r => r.PermissionId).ToList(); var all = _permissionInfoRepository.GetAll().ToList(); return(IviewTree.RecursiveQueries(all, seleteids)); }
public List <IviewTree> GetRoleTree(string userId) { var seleteids = _userRoleRepository.GetAll().Where(u => u.UserId == userId).Select(r => r.RoleId).ToList(); var all = _roleRepository.GetAll().ToList(); return(IviewTree.LinearQueries(all, seleteids)); }
public List <IviewTree> GetOrganizationTree(string userId) { var seleteids = _organizationUnitUserRepository.GetAll().Where(u => u.UserId == userId).Select(r => r.OrganizationUnitId).ToList(); var all = _organizationUnitRepository.GetAll().ToList(); return(IviewTree.RecursiveQueries(all, seleteids)); }
public Task <List <IviewTree> > GetAllTree() { List <OrganizationUnitDto> all = Repository.GetAll().AsEnumerable().Select(MapToEntityDto).ToList(); List <IviewTree> data = IviewTree.RecursiveQueries(all); return(Task.FromResult(data)); }
public List <IviewTree> GetRoleTree(string organizationUnitId) { var seleteids = _organizationUnitRoleRepository.GetAll().Where(u => u.OrganizationUnitId == organizationUnitId).Select(r => r.RoleId).ToList(); var all = _roleRepository.GetAll().ToList(); return(IviewTree.LinearQueries(all, seleteids)); }
/// <summary> /// 获取当前节点下的子节点 /// </summary> /// <param name="parentId"></param> /// <returns></returns> public Task <List <IviewTree> > GetPermissionByParentId(string parentId) { var list = Repository.GetAll().Where(u => u.ParentId == (parentId ?? "-1")).AsEnumerable().Select(MapToEntityDto).ToList(); List <IviewTree> data = IviewTree.RecursiveQueries(list, parentId); return(Task.FromResult(data)); }
public Task <List <IviewTree> > GetAllTree() { CheckGetAllPermission(); List <PermissionInfoDto> all = Repository.GetAll().AsEnumerable().Select(MapToEntityDto).ToList(); List <IviewTree> data = IviewTree.RecursiveQueries(all); return(Task.FromResult(data)); }