public static YellowstonePathology.Document.Result.Data.PlacentalPathologyQuestionnaireData GetPlacentalPathologyQuestionnaire(string clientOrderId, object writer) { YellowstonePathology.Business.ClientOrder.Model.ClientOrder clientOrder = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullClientOrderByClientOrderId(clientOrderId, writer); XElement clientOrderElement = new XElement("ClientOrder"); YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderPropertyWriter = new Persistence.XmlPropertyReader(clientOrder, clientOrderElement); clientOrderPropertyWriter.Write(); foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetail clientOrderDetail in clientOrder.ClientOrderDetailCollection) { if (clientOrderDetail.OrderTypeCode == "PLCNT") { XElement clientOrderDetailElement = new XElement("ClientOrderDetail"); YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderDetailPropertyWriter = new Persistence.XmlPropertyReader(clientOrderDetail, clientOrderDetailElement); clientOrderDetailPropertyWriter.Write(); clientOrderElement.Add(clientOrderDetailElement); } } YellowstonePathology.Document.Result.Data.PlacentalPathologyQuestionnaireData result = new YellowstonePathology.Document.Result.Data.PlacentalPathologyQuestionnaireData(clientOrderElement); return result; }
private void PlacentalFormDisplayPage_Loaded(object sender, RoutedEventArgs e) { XElement clientOrderElement = this.m_ClientOrder.ToXML(false); foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetail clientOrderDetail in this.m_ClientOrder.ClientOrderDetailCollection) { if (clientOrderDetail.OrderTypeCode == "PLCNT") { XElement clientOrderDetailElement = new XElement("ClientOrderDetail"); YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderDetailPropertyWriter = new YellowstonePathology.Business.Persistence.XmlPropertyReader(clientOrderDetail, clientOrderDetailElement); clientOrderDetailPropertyWriter.Write(); clientOrderElement.Add(clientOrderDetailElement); } } YellowstonePathology.Document.Result.Data.PlacentalPathologyQuestionnaireData placentalPathologyQuestionnaireData = new YellowstonePathology.Document.Result.Data.PlacentalPathologyQuestionnaireData(clientOrderElement); YellowstonePathology.Document.PlacentalPathologyQuestionnaire placentalPathologyQuestionnare = new Document.PlacentalPathologyQuestionnaire(placentalPathologyQuestionnaireData); this.Viewer.Document = placentalPathologyQuestionnare.FixedDocument; }