DeptServiceGetSelfAndParents Method
获取指定子部门及其所有父部门。
Namespace: QuickAdmin.Service.AdminAssembly: QuickAdmin.Net (in QuickAdmin.Net.dll) Version: 2.0.10
public virtual SysDept GetSelfAndParents(
long childId,
int? maxUpLevel = null
)
- childId long
- 子部门 Id。
- maxUpLevel int? (Optional)
-
指示最高反向查询到子部门的第几级父部门,从 1 开始,1 表示到其直接父部门,2 表示到其父部门的父部门,以此类推。
null 表示一直查询到根部门。
SysDept
返回
childId 对应部门,其父部门依次存储在递归的
Parent 属性中。
childId 对应部门不存在时,将返回
null。
IDeptServiceGetSelfAndParents(long, int?)
将从 childId 开始,反向递归查询其父部门。