Routine Update

This commit is contained in:
yubaolee
2015-10-29 23:51:10 +08:00
parent d4580051c6
commit 104866d83b
4 changed files with 83 additions and 59 deletions

View File

@@ -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);
}
}
}