OrgUnitService |
[This is preliminary documentation and is subject to change.]
Overview of OrgUnitService web service
Get a collection of org units whose name starts with 'searchName'
public OrgUnitCollection GetOrgUnitsSearchByName(string config, Guid sessionGuid, string searchName)
Get a collection of org units whose code starts with 'searchCode''
public OrgUnitCollection GetOrgUnitsSearchByCode(string config, Guid sessionGuid, string searchCode)
Get a collection of org units whose type starts with 'searchType'
public OrgUnitCollection GetOrgUnitsSearchByType(string config, Guid sessionGuid, string searchType)
In the following example we login and search for orgunits with type = sgh
Example of searching for orgunits with specified name
// GetOrgUnitsSearchByType method example string config = "GOP"; // or "Projektdata" - name of configuration string domain = "1351"; // domain for the user we login with string username = "Admin1351"; // username for the user we login with string password = "secret"; // password for the user we login with string searchType = "sgh"; // Orgunit type to search for //first we login LoginService loginService = new LoginService(); LogOnInfo logOnInfo = loginService.LogInPlainPassword(config, domain, username, password, false); // then we call OrgunitService using lonOnInfo data to get orgunits matching search name OrgunitService orgunitService = new OrgunitService(); OrgunitCollection orgunitCollection = orgunitService.GetOrgUnitsSearchByType(logOnInfo.ConfigName, logOnInfo.SessionGuid,searchType);