public IEnumerable<User> GetUsersByDepartament( OrganizationItem orgItem )
Get user by the organizational structure item, if the item is a position, then the user according to the position is returned,
if the department, then all the department employees, including the nested positions
Syntax
public IEnumerable<User> GetUsersByDepartament( OrganizationItem orgItem )
Parameters
- orgItem
- Type: OrganizationItem
Organizational structure element. Object. Access path: PublicAPI.Portal.Security.OrganizationItem
Return Value
Type: IEnumerable UserСписок сотрудников
Examples
//load the organizational structure item by ID var orgItem = PublicAPI.Portal.Security.OrganizationItem.Load(3); //get the list of users var userList = PublicAPI.Portal.Security.OrganizationItem.GetUsersByDepartament(orgItem); //userList - obtained list of users
See Also