private void ListBoxAliquots_MouseUp(object sender, MouseButtonEventArgs e)
        {
            if (this.ListBoxAliquots.SelectedItems.Count != 0)
            {
                YellowstonePathology.Business.Specimen.Model.ThinPrepSlide  thinPrepSlide  = new Business.Specimen.Model.ThinPrepSlide();
                YellowstonePathology.Business.Specimen.Model.PantherAliquot pantherAliquot = new Business.Specimen.Model.PantherAliquot();

                YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = (YellowstonePathology.Business.Test.AliquotOrder) this.ListBoxAliquots.SelectedItem;
                if (aliquotOrder.Status == YellowstonePathology.Business.Slide.Model.SlideStatusEnum.Created.ToString())
                {
                    if (aliquotOrder.AliquotType == thinPrepSlide.AliquotType)
                    {
                        this.PrintThinPrepSlide(aliquotOrder);
                    }
                    else if (aliquotOrder.AliquotType == pantherAliquot.AliquotType)
                    {
                        YellowstonePathology.Business.Specimen.Model.SpecimenOrder      specimenOrder         = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByAliquotOrderId(aliquotOrder.AliquotOrderId);
                        YellowstonePathology.Business.Label.Model.PantherLabel          pantherLabel          = new Business.Label.Model.PantherLabel(aliquotOrder.AliquotOrderId, this.m_AccessionOrder.PatientDisplayName, this.m_AccessionOrder.PBirthdate.Value, specimenOrder.Description);
                        YellowstonePathology.Business.Label.Model.MolecularLabelPrinter molecularLabelPrinter = new Business.Label.Model.MolecularLabelPrinter();
                        molecularLabelPrinter.Queue.Enqueue(pantherLabel);
                        molecularLabelPrinter.Print();
                    }
                    aliquotOrder.Status = YellowstonePathology.Business.TrackedItemStatusEnum.Printed.ToString();
                }

                this.NotifyPropertyChanged(string.Empty);
            }
        }
 private void ButtonAddPantherAliquot_Click(object sender, RoutedEventArgs e)
 {
     YellowstonePathology.Business.Specimen.Model.PantherAliquot pantherAliquot = new Business.Specimen.Model.PantherAliquot();
     if (this.m_SpecimenOrder.AliquotOrderCollection.Exists(pantherAliquot) == false)
     {
         YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = this.m_SpecimenOrder.AliquotOrderCollection.AddAliquot(pantherAliquot, this.m_SpecimenOrder, this.m_AccessionOrder.AccessionDate.Value);
     }
     else
     {
         MessageBox.Show("Cannot add another Panther Aliquot as one already exists.");
     }
 }
        private void ButtonReprintSelected_Click(object sender, RoutedEventArgs e)
        {
            if (this.ListBoxAliquots.SelectedItem != null)
            {
                YellowstonePathology.Business.Test.AliquotOrder             aliquotOrder   = (YellowstonePathology.Business.Test.AliquotOrder) this.ListBoxAliquots.SelectedItem;
                YellowstonePathology.Business.Specimen.Model.ThinPrepSlide  thinPrepSlide  = new Business.Specimen.Model.ThinPrepSlide();
                YellowstonePathology.Business.Specimen.Model.PantherAliquot pantherAliquot = new Business.Specimen.Model.PantherAliquot();

                if (aliquotOrder.AliquotType == thinPrepSlide.AliquotType)
                {
                    this.PrintThinPrepSlide(aliquotOrder);
                }
                else if (aliquotOrder.AliquotType == pantherAliquot.AliquotType)
                {
                    YellowstonePathology.Business.Specimen.Model.SpecimenOrder      specimenOrder         = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByAliquotOrderId(aliquotOrder.AliquotOrderId);
                    YellowstonePathology.Business.Label.Model.PantherLabel          pantherLabel          = new Business.Label.Model.PantherLabel(aliquotOrder.AliquotOrderId, this.m_AccessionOrder.PatientDisplayName, this.m_AccessionOrder.PBirthdate.Value, specimenOrder.Description);
                    YellowstonePathology.Business.Label.Model.MolecularLabelPrinter molecularLabelPrinter = new Business.Label.Model.MolecularLabelPrinter();
                    molecularLabelPrinter.Queue.Enqueue(pantherLabel);
                    molecularLabelPrinter.Print();
                }
            }
        }
        private void ButtonReprintSelected_Click(object sender, RoutedEventArgs e)
        {
            if (this.ListBoxAliquots.SelectedItem != null)
            {
                YellowstonePathology.Business.Test.AliquotOrder             aliquotOrder   = (YellowstonePathology.Business.Test.AliquotOrder) this.ListBoxAliquots.SelectedItem;
                YellowstonePathology.Business.Specimen.Model.ThinPrepSlide  thinPrepSlide  = new Business.Specimen.Model.ThinPrepSlide();
                YellowstonePathology.Business.Specimen.Model.PantherAliquot pantherAliquot = new Business.Specimen.Model.PantherAliquot();

                if (aliquotOrder.AliquotType == thinPrepSlide.AliquotType)
                {
                    this.PrintThinPrepSlide(aliquotOrder);
                }
                else if (aliquotOrder.AliquotType == pantherAliquot.AliquotType)
                {
                    YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByAliquotOrderId(aliquotOrder.AliquotOrderId);
                    string zplCommands = Business.Label.Model.PantherZPLLabel.GetCommands(aliquotOrder.AliquotOrderId, this.m_AccessionOrder.PBirthdate.Value, this.m_AccessionOrder.PatientDisplayName, specimenOrder.Description);

                    Business.Label.Model.ZPLPrinterTCP zplPrinter = new Business.Label.Model.ZPLPrinterTCP("10.1.1.19");
                    zplPrinter.Print(zplCommands);
                }
            }
        }
        private void ListBoxAliquots_MouseUp(object sender, MouseButtonEventArgs e)
        {
            if (this.ListBoxAliquots.SelectedItems.Count != 0)
            {
                YellowstonePathology.Business.Specimen.Model.ThinPrepSlide thinPrepSlide = new Business.Specimen.Model.ThinPrepSlide();
                YellowstonePathology.Business.Specimen.Model.PantherAliquot pantherAliquot = new Business.Specimen.Model.PantherAliquot();

                YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = (YellowstonePathology.Business.Test.AliquotOrder)this.ListBoxAliquots.SelectedItem;
                if (aliquotOrder.Status == YellowstonePathology.Business.Slide.Model.SlideStatusEnum.Created.ToString())
                {
                    if (aliquotOrder.AliquotType == thinPrepSlide.AliquotType)
                    {
                        this.PrintThinPrepSlide(aliquotOrder);
                    }
                    else if(aliquotOrder.AliquotType == pantherAliquot.AliquotType)
                    {
                        YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByAliquotOrderId(aliquotOrder.AliquotOrderId);
                        YellowstonePathology.Business.Label.Model.PantherLabel pantherLabel = new Business.Label.Model.PantherLabel(aliquotOrder.AliquotOrderId, this.m_AccessionOrder.PatientDisplayName, this.m_AccessionOrder.PBirthdate.Value, specimenOrder.Description);
                        YellowstonePathology.Business.Label.Model.MolecularLabelPrinter molecularLabelPrinter = new Business.Label.Model.MolecularLabelPrinter();
                        molecularLabelPrinter.Queue.Enqueue(pantherLabel);
                        molecularLabelPrinter.Print();
                    }
                    aliquotOrder.Status = YellowstonePathology.Business.TrackedItemStatusEnum.Printed.ToString();
                }

                this.NotifyPropertyChanged(string.Empty);
            }
        }
        private void ButtonReprintSelected_Click(object sender, RoutedEventArgs e)
        {
            if (this.ListBoxAliquots.SelectedItem != null)
            {
                YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = (YellowstonePathology.Business.Test.AliquotOrder)this.ListBoxAliquots.SelectedItem;
                YellowstonePathology.Business.Specimen.Model.ThinPrepSlide thinPrepSlide = new Business.Specimen.Model.ThinPrepSlide();
                YellowstonePathology.Business.Specimen.Model.PantherAliquot pantherAliquot = new Business.Specimen.Model.PantherAliquot();

                if (aliquotOrder.AliquotType == thinPrepSlide.AliquotType)
                {
                    this.PrintThinPrepSlide(aliquotOrder);
                }
                else if (aliquotOrder.AliquotType == pantherAliquot.AliquotType)
                {
                    YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByAliquotOrderId(aliquotOrder.AliquotOrderId);
                    YellowstonePathology.Business.Label.Model.PantherLabel pantherLabel = new Business.Label.Model.PantherLabel(aliquotOrder.AliquotOrderId, this.m_AccessionOrder.PatientDisplayName, this.m_AccessionOrder.PBirthdate.Value, specimenOrder.Description);
                    YellowstonePathology.Business.Label.Model.MolecularLabelPrinter molecularLabelPrinter = new Business.Label.Model.MolecularLabelPrinter();
                    molecularLabelPrinter.Queue.Enqueue(pantherLabel);
                    molecularLabelPrinter.Print();
                }
            }
        }
 private void ButtonAddPantherAliquot_Click(object sender, RoutedEventArgs e)
 {
     YellowstonePathology.Business.Specimen.Model.PantherAliquot pantherAliquot = new Business.Specimen.Model.PantherAliquot();
     if (this.m_SpecimenOrder.AliquotOrderCollection.Exists(pantherAliquot) == false)
     {
         YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = this.m_SpecimenOrder.AliquotOrderCollection.AddAliquot(pantherAliquot, this.m_SpecimenOrder, this.m_AccessionOrder.AccessionDate.Value);
     }
     else
     {
         MessageBox.Show("Cannot add another Panther Aliquot as one already exists.");
     }
 }
        private void ButtonReprintSelected_Click(object sender, RoutedEventArgs e)
        {
            if (this.ListBoxAliquots.SelectedItem != null)
            {
                YellowstonePathology.Business.Test.AliquotOrder aliquotOrder = (YellowstonePathology.Business.Test.AliquotOrder)this.ListBoxAliquots.SelectedItem;
                YellowstonePathology.Business.Specimen.Model.ThinPrepSlide thinPrepSlide = new Business.Specimen.Model.ThinPrepSlide();
                YellowstonePathology.Business.Specimen.Model.PantherAliquot pantherAliquot = new Business.Specimen.Model.PantherAliquot();

                if (aliquotOrder.AliquotType == thinPrepSlide.AliquotType)
                {
                    this.PrintThinPrepSlide(aliquotOrder);
                }
                else if (aliquotOrder.AliquotType == pantherAliquot.AliquotType)
                {
                    YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.m_AccessionOrder.SpecimenOrderCollection.GetSpecimenOrderByAliquotOrderId(aliquotOrder.AliquotOrderId);
                    string zplCommands = Business.Label.Model.PantherZPLLabel.GetCommands(aliquotOrder.AliquotOrderId, this.m_AccessionOrder.PBirthdate.Value, this.m_AccessionOrder.PatientDisplayName, specimenOrder.Description);

                    Business.Label.Model.ZPLPrinter zplPrinter = new Business.Label.Model.ZPLPrinter("10.1.1.19");
                    zplPrinter.Print(zplCommands);
                }
            }
        }