Organizational Structure Element
Access path: PublicAPI.Portal.Security.OrganizationItemMethods
Name | Description | |
---|---|---|
Appoint |
Assign user to the selected positions. The existing positions remain.
| |
Count |
Returns the total number of objects of this type
| |
Count(IEntityFilter) |
Get Total Number of Objects by Filter
| |
Create |
Create New Entity (without a Database entry)
| |
Delete |
Delete Object
| |
Find(FetchOptions) |
Find objects according to fetch options
| |
Find(String) |
Find objects according to the filter in the EQL language
| |
Find(IEntityFilter, FetchOptions) |
Fing objects according to fetch options and filter
| |
FindByIdArray |
Find All Objects by Array IDs
| |
GetChiefByUser |
Get the user chiefs
| |
GetSubItems |
Get all the subitems of an organizational structure item
| |
GetSubItemsByLvl |
Get all the organizational structure item subitmes by nest level
| |
GetSubordinateByUser |
Get the user subordinates
| |
GetUserChiefsHierarchy |
Get the model of hierarchical display of the user's superiors
| |
GetUsersByDepartament |
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
| |
IsDirty |
Check, if there are unsaved changes in the object
| |
IsNew |
Check, if the object is new (not saved in the database)
| |
Load(Guid) |
Load by UID. If not found, an exception is invoked
| |
Load(Int64) |
Load by ID. If not found, an exception is invoked
| |
LoadOrCreate(Guid) |
Load by ID. If not found, the new object is returned
| |
LoadOrCreate(Int64) |
Load by ID. If not found, the new object is returned
| |
LoadOrNull(Guid) |
Load by UID. If not found, null is returned
| |
LoadOrNull(Int64) |
Load by ID. If not found, null is returned
| |
Refresh |
Refresh (read over) Object from Database
| |
Save |
Save Object to Database
| |
SetAppointments |
Assign user to the selected positions with deleting previous positions.
|
Properties
Name | Description | |
---|---|---|
TypeUid |
Returns the unique object identifier "Organizational Structure Element"
|
Remarks
Examples
Assign a user created here, to the role of department head
//load the department head var orgItem = PublicAPI.Security.OrganizationItem.Load(3); //assign the use to the position PublicAPI.Security.OrganizationItem.Appoint(myUser, new OrganizationItem[] {orgItem});
You may get the user’s superiors and subordinates
//getting the user’s superiors var chiefList = PublicAPI.Security.OrganizationItem.GetChiefByUser(myUser); //getting the user’s subordinates var subordinateList = PublicAPI.Security.OrganizationItem.GetSubordinateByUser(myUser);
You can get all users of some specific department
//load the department var department = PublicAPI.Security.OrganizationItem.Load(2); //get the department users var userList = PublicAPI.Security.OrganizationItem.GetUsersByDepartment(department);
See Also