DeptServiceGetSelfAndParents Method

获取指定子部门及其所有父部门。

Definition

Namespace: QuickAdmin.Service.Admin
Assembly: QuickAdmin.Net (in QuickAdmin.Net.dll) Version: 2.0.10
C#
public virtual SysDept GetSelfAndParents(
	long childId,
	int? maxUpLevel = null
)

Parameters

childId  long
子部门 Id
maxUpLevel  int?  (Optional)
指示最高反向查询到子部门的第几级父部门,从 1 开始,1 表示到其直接父部门,2 表示到其父部门的父部门,以此类推。
null 表示一直查询到根部门。

Return Value

SysDept
返回 childId 对应部门,其父部门依次存储在递归的 Parent 属性中。
childId 对应部门不存在时,将返回 null

Implements

IDeptServiceGetSelfAndParents(long, int?)

Remarks

将从 childId 开始,反向递归查询其父部门。

See Also