mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-12-26 22:25:39 +08:00
Routine Update
This commit is contained in:
@@ -21,6 +21,12 @@ namespace OpenAuth.App
|
||||
return _repository.LoadOrgs();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加部门
|
||||
/// </summary>
|
||||
/// <param name="org">The org.</param>
|
||||
/// <returns>System.Int32.</returns>
|
||||
/// <exception cref="System.Exception">未能找到该组织的父节点信息</exception>
|
||||
public int AddOrg(Org org)
|
||||
{
|
||||
string cascadeId;
|
||||
@@ -61,5 +67,15 @@ namespace OpenAuth.App
|
||||
_repository.Save();
|
||||
return org.Id;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 部门的直接子部门
|
||||
/// </summary>
|
||||
/// <param name="orgId">The org unique identifier.</param>
|
||||
/// <returns>IEnumerable{Org}.</returns>
|
||||
public IEnumerable<Org> LoadChildren(int orgId)
|
||||
{
|
||||
return _repository.Find(u => u.ParentId == orgId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user