Ejemplo n.º 1
0
 private void HyperLinkRemoveSelectedReport_Click(object sender, RoutedEventArgs e)
 {
     if (ListViewOtherReports.SelectedItem != null)
     {
         YellowstonePathology.Business.Test.BoneMarrowSummary.OtherReportView otherReportView = ListViewOtherReports.SelectedItem as YellowstonePathology.Business.Test.BoneMarrowSummary.OtherReportView;
         if (string.IsNullOrEmpty(otherReportView.SummaryReportNo) == false && otherReportView.SummaryReportNo == this.m_PanelSetOrder.ReportNo)
         {
             Business.Test.AccessionOrder accessionOrder = Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(otherReportView.MasterAccessionNo, this);
             if (accessionOrder.AccessionLock.IsLockAquiredByMe == true)
             {
                 Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(otherReportView.ReportNo);
                 panelSetOrder.SummaryReportNo = null;
                 Business.Persistence.DocumentGateway.Instance.Save();
                 this.OtherReportViewCollection = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetOtherReportViewCollection(this.m_AccessionOrder.PatientId, this.m_AccessionOrder.MasterAccessionNo);
             }
             else
             {
                 MessageBox.Show("Unable to remove the selected report as that accession is locked.");
             }
         }
     }
     else
     {
         MessageBox.Show("Select a report to remove");
     }
 }
Ejemplo n.º 2
0
 private void AddOtherReport(YellowstonePathology.Business.Test.BoneMarrowSummary.OtherReportView otherReportView)
 {
     Business.Test.AccessionOrder accessionOrder = Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(otherReportView.MasterAccessionNo, this);
     if (accessionOrder.AccessionLock.IsLockAquiredByMe == true)
     {
         Business.Test.PanelSetOrder panelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(otherReportView.ReportNo);
         panelSetOrder.SummaryReportNo = this.m_PanelSetOrder.ReportNo;
         Business.Persistence.DocumentGateway.Instance.Save();
         this.OtherReportViewCollection = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetOtherReportViewCollection(this.m_AccessionOrder.PatientId, this.m_AccessionOrder.MasterAccessionNo);
     }
     else
     {
         MessageBox.Show("Unable to add the selected report to the summary as that accession is locked.");
     }
 }
Ejemplo n.º 3
0
 private void HyperLinkAddSelectedReport_Click(object sender, RoutedEventArgs e)
 {
     if (ListViewOtherReports.SelectedItem != null)
     {
         YellowstonePathology.Business.Test.BoneMarrowSummary.OtherReportView otherReportView = ListViewOtherReports.SelectedItem as YellowstonePathology.Business.Test.BoneMarrowSummary.OtherReportView;
         Business.Rules.MethodResult methodResult = this.CanAddReportToSummary(otherReportView);
         if (methodResult.Success == true)
         {
             this.AddOtherReport(otherReportView);
         }
         else
         {
             MessageBox.Show(methodResult.Message);
         }
     }
     else
     {
         MessageBox.Show("Select a report to add");
     }
 }