private string GetParentId(string departmentRef) { DepartmentByReference req = new DepartmentByReference(); req.Reference = departmentRef; RecordResponse <Department> resp = (service as ICompanyStructureService).GetDepartmentByReference(req); if (resp == null || resp.result == null) { return(null); } else { return(resp.result.recordId); } }
public RecordResponse <Department> GetDepartmentByReference(DepartmentByReference request) { RecordResponse <Department> response; var headers = SessionHelper.GetAuthorizationHeadersForUser(); Dictionary <string, string> queryParams = new Dictionary <string, string>(); RecordWebServiceResponse <Department> webResponse = _companyRepository.GetDepartmentByReference(headers, request.Parameters); response = CreateServiceResponse <RecordResponse <Department> >(webResponse); if (response.Success) { response.result = webResponse.record; } return(response); }