Example #1
0
        private void ButtonDelete_Click(object sender, RoutedEventArgs e)
        {
            YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = this.m_SpecimenOrder.AliquotOrderCollection.GetLastBlock();

            if (aliquotOrder != null)
            {
                YellowstonePathology.Business.Visitor.RemoveAliquotOrderVisitor removeAliquotOrderVisitor = new Business.Visitor.RemoveAliquotOrderVisitor(aliquotOrder);
                this.m_AccessionOrder.TakeATrip(removeAliquotOrderVisitor);

                this.m_SpecimenOrder.SetAliquotRequestCount();
                this.GrossBlockManagementView = new Business.View.GrossBlockManagementView(this.m_AccessionOrder, this.m_CaseNotesDocument, this.m_SpecimenOrder);
                this.SetupSpecimenView();
            }
        }
        private void ButtonDelete_Click(object sender, RoutedEventArgs e)
        {
            List <string> selectedSlideOrderIds = this.m_AliquotAndStainOrderView.GetSelectedSlideOrderIds();

            foreach (string slideOrderId in selectedSlideOrderIds)
            {
                YellowstonePathology.Business.Slide.Model.SlideOrder          slideOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSlideOrder(slideOrderId);
                YellowstonePathology.Business.Visitor.RemoveSlideOrderVisitor removeSlideOrderVisitor = new Business.Visitor.RemoveSlideOrderVisitor(slideOrder);
                this.m_AccessionOrder.TakeATrip(removeSlideOrderVisitor);
            }

            YellowstonePathology.Business.Test.Model.TestOrderCollection selectedTestOrders = this.m_AliquotAndStainOrderView.GetSelectedTestOrders();
            YellowstonePathology.Business.Test.Model.TestCollection      allTests           = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests();
            foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in selectedTestOrders)
            {
                YellowstonePathology.Business.Visitor.RemoveTestOrderVisitor removeTestOrderVisitor = new Business.Visitor.RemoveTestOrderVisitor(testOrder.TestOrderId);
                this.m_AccessionOrder.TakeATrip(removeTestOrderVisitor);

                YellowstonePathology.Business.Test.Model.Test test = allTests.GetTest(testOrder.TestId);
                if (test.NeedsAcknowledgement == true)
                {
                    this.m_StainAcknowledgementTaskOrderVisitor.RemoveTestOrder(testOrder);
                }
            }
            this.m_AccessionOrder.TakeATrip(this.m_StainAcknowledgementTaskOrderVisitor);

            YellowstonePathology.Business.Test.AliquotOrderCollection selectedAliquots = this.m_AliquotAndStainOrderView.GetSelectedAliquots();
            foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in selectedAliquots)
            {
                YellowstonePathology.Business.Visitor.RemoveAliquotOrderVisitor removeAliquotOrderVisitor = new Business.Visitor.RemoveAliquotOrderVisitor(aliquotOrder);
                this.m_AccessionOrder.TakeATrip(removeAliquotOrderVisitor);
                this.m_AccessionOrder.SpecimenOrderCollection.SetAliquotRequestCount();
            }

            //YellowstonePathology.Business.Persistence.DocumentGateway.Instance.SubmitChanges(this.m_AccessionOrder, false);
            this.m_AliquotAndStainOrderView.Refresh(true, this.m_PanelSetOrder);
            this.NotifyPropertyChanged("AliquotAndStainOrderView");
        }
        private void ButtonDelete_Click(object sender, RoutedEventArgs e)
        {
            YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = this.m_SpecimenOrder.AliquotOrderCollection.GetLastBlock();

            if (aliquotOrder != null)
            {
                YellowstonePathology.Business.Visitor.RemoveAliquotOrderVisitor removeAliquotOrderVisitor = new Business.Visitor.RemoveAliquotOrderVisitor(aliquotOrder);
                this.m_AccessionOrder.TakeATrip(removeAliquotOrderVisitor);

                this.m_SpecimenOrder.SetAliquotRequestCount();
                this.GrossBlockManagementView = new Business.View.GrossBlockManagementView(this.m_AccessionOrder, this.m_CaseNotesDocument, this.m_SpecimenOrder);
                this.SetupSpecimenView();
            }
        }
 private void DeleteAliquot()
 {
     YellowstonePathology.Business.Visitor.RemoveAliquotOrderVisitor removeAliquotOrderVisitor = new Business.Visitor.RemoveAliquotOrderVisitor(this.m_AliquotOrder);
     this.m_AccessionOrder.TakeATrip(removeAliquotOrderVisitor);
 }
 private void DeleteAliquot()
 {
     YellowstonePathology.Business.Visitor.RemoveAliquotOrderVisitor removeAliquotOrderVisitor = new Business.Visitor.RemoveAliquotOrderVisitor(this.m_AliquotOrder);
     this.m_AccessionOrder.TakeATrip(removeAliquotOrderVisitor);
 }
        private void ButtonDelete_Click(object sender, RoutedEventArgs e)
        {
            List<string> selectedSlideOrderIds = this.m_AliquotAndStainOrderView.GetSelectedSlideOrderIds();
            foreach (string slideOrderId in selectedSlideOrderIds)
            {
                YellowstonePathology.Business.Slide.Model.SlideOrder slideOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSlideOrder(slideOrderId);
                YellowstonePathology.Business.Visitor.RemoveSlideOrderVisitor removeSlideOrderVisitor = new Business.Visitor.RemoveSlideOrderVisitor(slideOrder);
                this.m_AccessionOrder.TakeATrip(removeSlideOrderVisitor);
            }

            YellowstonePathology.Business.Test.Model.TestOrderCollection selectedTestOrders = this.m_AliquotAndStainOrderView.GetSelectedTestOrders();
            YellowstonePathology.Business.Test.Model.TestCollection allTests = YellowstonePathology.Business.Test.Model.TestCollection.GetAllTests();
            foreach (YellowstonePathology.Business.Test.Model.TestOrder testOrder in selectedTestOrders)
            {
                YellowstonePathology.Business.Visitor.RemoveTestOrderVisitor removeTestOrderVisitor = new Business.Visitor.RemoveTestOrderVisitor(testOrder.TestOrderId);
                this.m_AccessionOrder.TakeATrip(removeTestOrderVisitor);

                YellowstonePathology.Business.Test.Model.Test test = allTests.GetTest(testOrder.TestId);
                if (test.NeedsAcknowledgement == true)
                {
                    this.m_StainAcknowledgementTaskOrderVisitor.RemoveTestOrder(testOrder);
                }
            }
            this.m_AccessionOrder.TakeATrip(this.m_StainAcknowledgementTaskOrderVisitor);

            YellowstonePathology.Business.Test.AliquotOrderCollection selectedAliquots = this.m_AliquotAndStainOrderView.GetSelectedAliquots();
            foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in selectedAliquots)
            {
                YellowstonePathology.Business.Visitor.RemoveAliquotOrderVisitor removeAliquotOrderVisitor = new Business.Visitor.RemoveAliquotOrderVisitor(aliquotOrder);
                this.m_AccessionOrder.TakeATrip(removeAliquotOrderVisitor);
                this.m_AccessionOrder.SpecimenOrderCollection.SetAliquotRequestCount();
            }

            //YellowstonePathology.Business.Persistence.DocumentGateway.Instance.SubmitChanges(this.m_AccessionOrder, false);
            this.m_AliquotAndStainOrderView.Refresh(true, this.m_PanelSetOrder);
            this.NotifyPropertyChanged("AliquotAndStainOrderView");
        }