public SampleManager(string sampleList) { try { this.sampleList = sampleList; openSampleAttribute = new Sam().ProcessGetOpenSampleAttributes(sampleList); } catch { throw; } }
/// <summary> /// This function gets the list of errors and the open sample description with its correspondant attributes /// </summary> /// <param name="sampleId"></param> /// <returns>returns the list of attributes and the details of the sample</returns> public OpenSampleAttributeResponseObject ProcessGetOpenSampleAttributes(string sampleList) { try { ISam samServiceCall = new Sam(); XDocument serviceResponse = samServiceCall.GetOpenSampleAttributes(sampleList); OpenSampleAttributeResponseObject openSampleAttributeResponse = new OpenSampleAttributeResponseObject(); openSampleAttributeResponse.OpenSampleAttributeList = new List<OpenSampleObject>(); openSampleAttributeResponse.ServiceErrorList = samServiceCall.GetServiceErrors(serviceResponse); //If no error were returned get the list of attributes with the details of the sample if (openSampleAttributeResponse.ServiceErrorList.Count() == 0) { openSampleAttributeResponse.OpenSampleAttributeList = samServiceCall.GetOpenSampleAttributeResponse(serviceResponse); } return openSampleAttributeResponse; } catch { throw; } }