private void HyperLinkEditDistribution_Click(object sender, RoutedEventArgs e)
 {
     if (this.ListViewTestOrderReportDistribution.SelectedItem != null)
     {
         YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistribution testOrderReportDistribution = (YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistribution) this.ListViewTestOrderReportDistribution.SelectedItem;
         TestOrderReportDistributionPage testOrderReportDistributionPage = new TestOrderReportDistributionPage(testOrderReportDistribution, this.m_PageNavigator);
         testOrderReportDistributionPage.Next += new TestOrderReportDistributionPage.NextEventHandler(TestOrderReportDistributionPage_Next);
         testOrderReportDistributionPage.Back += new TestOrderReportDistributionPage.BackEventHandler(TestOrderReportDistributionPage_Back);
         this.m_PageNavigator.Navigate(testOrderReportDistributionPage);
     }
     else
     {
         MessageBox.Show("You must select a distribution to edit first.");
     }
 }
        private void HyperLinkAddPrintDistribution_Click(object sender, RoutedEventArgs e)
        {
            if (this.m_PanelSetOrder.Distribute == true)
            {
                string testOrderReportDistributionId = MongoDB.Bson.ObjectId.GenerateNewId().ToString();
                YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistribution testOrderReportDistribution =
                    new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistribution(testOrderReportDistributionId, testOrderReportDistributionId, this.m_PanelSetOrder.ReportNo, 0, null, 0, "Special Distribution",
                                                                                                           YellowstonePathology.Business.ReportDistribution.Model.DistributionType.PRINT, null);

                TestOrderReportDistributionPage testOrderReportDistributionPage = new TestOrderReportDistributionPage(testOrderReportDistribution, this.m_PageNavigator);
                testOrderReportDistributionPage.Next += new TestOrderReportDistributionPage.NextEventHandler(AddDistribution_TestOrderReportDistributionPage_Next);
                testOrderReportDistributionPage.Back += new TestOrderReportDistributionPage.BackEventHandler(AddDistribution_TestOrderReportDistributionPage_Back);
                this.m_PageNavigator.Navigate(testOrderReportDistributionPage);
            }
        }
        private void HyperLinkEditDistribution_Click(object sender, RoutedEventArgs e)
        {
            if (this.ListViewTestOrderReportDistribution.SelectedItem != null)
            {
                YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistribution testOrderReportDistribution = (YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistribution)this.ListViewTestOrderReportDistribution.SelectedItem;
                TestOrderReportDistributionPage testOrderReportDistributionPage = new TestOrderReportDistributionPage(testOrderReportDistribution, this.m_PageNavigator);
                testOrderReportDistributionPage.Next += new TestOrderReportDistributionPage.NextEventHandler(TestOrderReportDistributionPage_Next);
                testOrderReportDistributionPage.Back += new TestOrderReportDistributionPage.BackEventHandler(TestOrderReportDistributionPage_Back);
                this.m_PageNavigator.Navigate(testOrderReportDistributionPage);

            }
            else
            {
                MessageBox.Show("You must select a distribution to edit first.");
            }
        }
        private void HyperLinkAddPrintDistribution_Click(object sender, RoutedEventArgs e)
        {
            if (this.m_PanelSetOrder.Distribute == true)
            {
                string testOrderReportDistributionId = MongoDB.Bson.ObjectId.GenerateNewId().ToString();
                YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistribution testOrderReportDistribution =
                    new YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistribution(testOrderReportDistributionId, testOrderReportDistributionId, this.m_PanelSetOrder.ReportNo, 0, null, 0, "Special Distribution",
                        YellowstonePathology.Business.ReportDistribution.Model.DistributionType.PRINT, null, false);

                TestOrderReportDistributionPage testOrderReportDistributionPage = new TestOrderReportDistributionPage(testOrderReportDistribution, this.m_PageNavigator);
                testOrderReportDistributionPage.Next += new TestOrderReportDistributionPage.NextEventHandler(AddDistribution_TestOrderReportDistributionPage_Next);
                testOrderReportDistributionPage.Back += new TestOrderReportDistributionPage.BackEventHandler(AddDistribution_TestOrderReportDistributionPage_Back);
                this.m_PageNavigator.Navigate(testOrderReportDistributionPage);

            }
        }