public TaskOrderDataSheet(YellowstonePathology.Business.Task.Model.TaskOrder taskOrder, YellowstonePathology.Business.Test.AccessionOrder accessionOrder) { this.m_TaskOrderView = new YellowstonePathology.Business.Task.Model.TaskOrderView(taskOrder); this.m_AccessionOrder = accessionOrder; YellowstonePathology.Document.Xps.PlainHeader header = new YellowstonePathology.Document.Xps.PlainHeader("Task Order Data Sheet"); YellowstonePathology.Document.Xps.PlainFooter footer = new YellowstonePathology.Document.Xps.PlainFooter(this.m_TaskOrderView.TaskOrder.ReportNo); this.m_ReportDocument = new YellowstonePathology.Document.Xps.ReportDocument(header, footer); this.SetTaskGrid(); this.SetDetailGrid(); }
private void ButtonTaskOrderPrint_Click(object sender, RoutedEventArgs e) { if (this.ListViewTaskOrders.SelectedItem != null) { YellowstonePathology.Business.Task.Model.TaskOrderView taskOrderView = (YellowstonePathology.Business.Task.Model.TaskOrderView) this.ListViewTaskOrders.SelectedItem; YellowstonePathology.Business.Test.AccessionOrder accessionOrder = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(taskOrderView.TaskOrder.MasterAccessionNo, this.m_Writer); Login.Receiving.TaskOrderDataSheet taskOrderDataSheet = new Login.Receiving.TaskOrderDataSheet(taskOrderView.TaskOrder, accessionOrder); System.Printing.PrintQueue printQueue = new System.Printing.LocalPrintServer().DefaultPrintQueue; System.Windows.Controls.PrintDialog printDialog = new System.Windows.Controls.PrintDialog(); printDialog.PrintTicket.PageOrientation = System.Printing.PageOrientation.Portrait; printDialog.PrintQueue = printQueue; printDialog.PrintDocument(taskOrderDataSheet.FixedDocument.DocumentPaginator, "Task Order Data Sheet"); } }
private void ListViewTaskOrders_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (this.ListViewTaskOrders.SelectedItem != null) { YellowstonePathology.Business.Task.Model.TaskOrderView selectedTaskOrderView = (YellowstonePathology.Business.Task.Model.TaskOrderView) this.ListViewTaskOrders.SelectedItem; YellowstonePathology.Business.Test.AccessionOrder accessionOrder = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(selectedTaskOrderView.TaskOrder.MasterAccessionNo, this.m_Writer); YellowstonePathology.Business.Task.Model.TaskOrder taskOrder = accessionOrder.TaskOrderCollection.GetTaskOrder(selectedTaskOrderView.TaskOrder.TaskOrderId); this.m_LoginPageWindow = new Login.Receiving.LoginPageWindow(); YellowstonePathology.UI.Login.Receiving.TaskOrderPath taskOrderPath = new Login.Receiving.TaskOrderPath(accessionOrder, taskOrder, this.m_LoginPageWindow.PageNavigator, PageNavigationModeEnum.Standalone); taskOrderPath.Close += new Login.Receiving.TaskOrderPath.CloseEventHandler(TaskOrderPath_Close); taskOrderPath.Start(); this.m_LoginPageWindow.ShowDialog(); YellowstonePathology.Business.Persistence.DocumentGateway.Instance.Push(accessionOrder, this.m_Writer); } }