protected Resolution GetResolution(Guid uniqueId) { try { SetEntityODATA <Resolution>(ODATA_RESOLUTION_CONTROLLER_NAME); ODataModel <Resolution> result = _httpClient.GetAsync <Resolution>().WithOData(string.Concat("$filter=UniqueId eq ", uniqueId)).ResponseToModel <ODataModel <Resolution> >(); return(result == null || result.Value == null || !result.Value.Any() ? null : result.Value.Single()); } catch (Exception ex) { throw ex; } }
protected DocumentUnitChain GetDocumentUnitChain(Guid uniqueId, ChainType chainType) { try { SetEntityODATA <DocumentUnitChain>(ODATA_DOCUMENT_UNIT_CHAIN_CONTROLLER_NAME); ODataModel <DocumentUnitChain> result = _httpClient.GetAsync <DocumentUnitChain>() .WithOData(string.Concat("$filter=DocumentUnit/UniqueId eq ", uniqueId, " and ChainType eq VecompSoftware.DocSuiteWeb.Entity.DocumentUnits.ChainType'", (int)chainType, "'")) .ResponseToModel <ODataModel <DocumentUnitChain> >(); return(result == null || result.Value == null || !result.Value.Any() ? null : result.Value.Single()); } catch (Exception ex) { throw ex; } }