private void ButtonPrintLabels_Click(object sender, RoutedEventArgs e) { //this.Save(false); YellowstonePathology.Business.Test.AliquotOrderCollection selectedAliquots = this.m_AliquotAndStainOrderView.GetSelectedAliquots(); YellowstonePathology.Business.Label.Model.AliquotOrderPrinter aliquotOrderPrinter = new Business.Label.Model.AliquotOrderPrinter(selectedAliquots, this.m_AccessionOrder); if (aliquotOrderPrinter.HasCassettesToPrint() == true) { if (this.m_AccessionOrder.PrintMateColumnNumber == 0) { MessageBox.Show("You must select the Cassette Color before printing."); return; } } aliquotOrderPrinter.Print(); //YellowstonePathology.Business.Persistence.DocumentGateway.Instance.SubmitChanges(this.m_AccessionOrder, false); this.m_AliquotAndStainOrderView.SetAliquotChecks(false); this.PrintSelectedSlides(); MessageBox.Show("The selected items have been submitted to the printer."); }
private void ButtonPrintLabels_Click(object sender, RoutedEventArgs e) { //this.Save(false); YellowstonePathology.Business.Test.AliquotOrderCollection selectedAliquots = this.m_AliquotAndStainOrderView.GetSelectedAliquots(); YellowstonePathology.Business.Label.Model.AliquotOrderPrinter aliquotOrderPrinter = new Business.Label.Model.AliquotOrderPrinter(selectedAliquots, this.m_AccessionOrder); if (aliquotOrderPrinter.HasCassettesToPrint() == true) { if (this.m_AccessionOrder.PrintMateColumnNumber == 0) { MessageBox.Show("You must select the Cassette Color before printing."); return; } } aliquotOrderPrinter.Print(); //YellowstonePathology.Business.Persistence.DocumentGateway.Instance.SubmitChanges(this.m_AccessionOrder, false); this.m_AliquotAndStainOrderView.SetAliquotChecks(false); this.PrintSelectedSlides(); MessageBox.Show("The selected items have been submitted to the printer."); }