Ejemplo n.º 1
0
        public async Task <EnterpriseReference> GetEnterpriseReference(EngineeringItem _item)
        {
            string getEnterpriseRefEndpoint = string.Format("{0}/{1}{2}", GetBaseResource(), _item.id, ENTERPRISE_REFERENCE);

            IRestResponse requestResponse = await GetAsync(getEnterpriseRefEndpoint);

            if (requestResponse.StatusCode != System.Net.HttpStatusCode.OK)
            {
                //handle according to established exception policy
                throw (new GetEnterpriseReferenceException(requestResponse));
            }

            EnterpriseReferenceSet enterpriseRefSet = JsonConvert.DeserializeObject <EnterpriseReferenceSet>(requestResponse.Content);

            if ((enterpriseRefSet != null) && (enterpriseRefSet.totalItems == 1))
            {
                return(enterpriseRefSet.member[0]);
            }

            return(null);
        }
Ejemplo n.º 2
0
 public async Task <NlsLabeledItemSet <EngineeringInstanceEffectivity> > GetEngineeringInstancesEffectivity(EngineeringItem _item)
 {
     return(await GetEngineeringInstancesEffectivity(_item.id));
 }
Ejemplo n.º 3
0
 //Gets all the Engineering Item Instances
 public async Task <NlsLabeledItemSet <EngineeringInstanceReference> > GetEngineeringInstances(EngineeringItem _item)
 {
     return(await GetEngineeringInstances(_item.id));
 }