public XElement GetReportDocument(string masterAccessionNo) { YellowstonePathology.YpiConnect.Contract.Flow.FlowAccessionCollection flowAccessionCollection = this.GetFlowAccession(masterAccessionNo); YellowstonePathology.Business.Domain.Persistence.SqlXmlPropertyReader flowAccessionReader = new Business.Domain.Persistence.SqlXmlPropertyReader(); flowAccessionReader.Initialize(typeof(YellowstonePathology.YpiConnect.Contract.Flow.FlowAccession)); flowAccessionCollection[0].ReadProperties(flowAccessionReader); XElement accessionDocument = flowAccessionReader.Document; YellowstonePathology.Business.Domain.Persistence.SqlXmlPropertyReader flowLLPReader = new Business.Domain.Persistence.SqlXmlPropertyReader(); flowLLPReader.Initialize(typeof(YellowstonePathology.YpiConnect.Contract.Flow.FlowLeukemia)); YellowstonePathology.YpiConnect.Contract.Domain.PanelSetOrderLeukemiaLymphoma panelSetOrderLeukemiaLymphoma = (YellowstonePathology.YpiConnect.Contract.Domain.PanelSetOrderLeukemiaLymphoma)flowAccessionCollection[0].PanelSetOrderCollection[0]; YellowstonePathology.YpiConnect.Contract.Flow.FlowLeukemia flowLeukemia = new Contract.Flow.FlowLeukemia(panelSetOrderLeukemiaLymphoma); flowLeukemia.ReadProperties(flowLLPReader); accessionDocument.Add(flowLLPReader.Document); XElement markerCollectionElement = new XElement("FlowMarkerCollection"); accessionDocument.Add(markerCollectionElement); foreach (YellowstonePathology.YpiConnect.Contract.Flow.FlowMarker flowMarker in panelSetOrderLeukemiaLymphoma.FlowMarkerCollection) { YellowstonePathology.Business.Domain.Persistence.SqlXmlPropertyReader flowMarkerReader = new Business.Domain.Persistence.SqlXmlPropertyReader(); flowMarkerReader.Initialize(typeof(YellowstonePathology.YpiConnect.Contract.Flow.FlowMarker)); flowMarker.ReadProperties(flowMarkerReader); markerCollectionElement.Add(flowMarkerReader.Document); } XElement reportDistributionCollectionElement = this.GetReportDistributionByMasterAccessionNo(masterAccessionNo); accessionDocument.Add(reportDistributionCollectionElement); XElement casehistoryElement = this.GetCaseHistoryDocument(masterAccessionNo); accessionDocument.Add(casehistoryElement); return(accessionDocument); }
private void ButtonAdd_Click(object sender, RoutedEventArgs e) { FlowMarkerDialog flowMarkerDialog = new FlowMarkerDialog(this.m_FlowAccessionCollection[0]); bool? result = flowMarkerDialog.ShowDialog(); if (result.HasValue && result.Value == true) { List <YellowstonePathology.YpiConnect.Contract.Flow.Marker> markers = flowMarkerDialog.SelectedMarkers; YellowstonePathology.YpiConnect.Contract.Domain.PanelSetOrderLeukemiaLymphoma panelSetOrderLeukemiaLymphoma = (YellowstonePathology.YpiConnect.Contract.Domain.PanelSetOrderLeukemiaLymphoma)m_FlowAccessionCollection[0].PanelSetOrderCollection[0]; foreach (YellowstonePathology.YpiConnect.Contract.Flow.Marker marker in markers) { panelSetOrderLeukemiaLymphoma.FlowMarkerCollection.Add(marker, panelSetOrderLeukemiaLymphoma.ReportNo); } } }