private void PrintDocument_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { int count = 1; int x = 3; int y = 8; for (int i = 0; i < 4; i++) { BlockLabel blockLabel = this.m_BlockLabelQueue.Dequeue(); blockLabel.DrawLabel(x, y, e); x = x + 106; count += 1; if (this.m_BlockLabelQueue.Count == 0) { break; } } if (this.m_BlockLabelQueue.Count == 0) { e.HasMorePages = false; } else { e.HasMorePages = true; } }
public BlockLabelPrinter(string aliquotOrderId, string aliquotLabel, string masterAccessionNo, string pLastName, string pFirstName) { this.m_BlockLabelQueue = new Queue<BlockLabel>(); BlockLabel blockLabel = new BlockLabel(); blockLabel.FromAliquotOrder(aliquotOrderId, aliquotLabel, masterAccessionNo, pLastName, pFirstName); this.m_BlockLabelQueue.Enqueue(blockLabel); }
public BlockLabelPrinter(YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection, YellowstonePathology.Business.Test.AccessionOrder accessionOrder) { this.m_BlockLabelQueue = new Queue <BlockLabel>(); foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in aliquotOrderCollection) { if (aliquotOrder.IsBlock() == true) { if (aliquotOrder.LabelType == YellowstonePathology.Business.Specimen.Model.AliquotLabelType.PaperLabel == true) { YellowstonePathology.Business.OrderIdParser orderIdParser = new OrderIdParser(accessionOrder.MasterAccessionNo); if (orderIdParser.IsLegacyMasterAccessionNo == false) { BlockLabel blockLabel = new BlockLabel(); blockLabel.FromAliquotOrder(aliquotOrder.AliquotOrderId, aliquotOrder.Label, accessionOrder.MasterAccessionNo, accessionOrder.PLastName, accessionOrder.PFirstName); this.m_BlockLabelQueue.Enqueue(blockLabel); aliquotOrder.Printed = true; } else { string reportNo = accessionOrder.PanelSetOrderCollection[0].ReportNo; BlockLabelLegacy blockLabel = new BlockLabelLegacy(); blockLabel.FromLegacyAliquotOrder(aliquotOrder.AliquotOrderId, aliquotOrder.Label, reportNo, accessionOrder.PLastName, accessionOrder.PFirstName); this.m_BlockLabelQueue.Enqueue(blockLabel); aliquotOrder.Printed = true; } } } } }
public BlockLabelPrinter(YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection, YellowstonePathology.Business.Test.AccessionOrder accessionOrder) { this.m_BlockLabelQueue = new Queue<BlockLabel>(); foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in aliquotOrderCollection) { if (aliquotOrder.IsBlock() == true) { if (aliquotOrder.LabelType == YellowstonePathology.Business.Specimen.Model.AliquotLabelType.PaperLabel == true) { YellowstonePathology.Business.OrderIdParser orderIdParser = new OrderIdParser(accessionOrder.MasterAccessionNo); if (orderIdParser.IsLegacyMasterAccessionNo == false) { BlockLabel blockLabel = new BlockLabel(); blockLabel.FromAliquotOrder(aliquotOrder.AliquotOrderId, aliquotOrder.Label, accessionOrder.MasterAccessionNo, accessionOrder.PLastName, accessionOrder.PFirstName); this.m_BlockLabelQueue.Enqueue(blockLabel); aliquotOrder.Printed = true; } else { string reportNo = accessionOrder.PanelSetOrderCollection[0].ReportNo; BlockLabelLegacy blockLabel = new BlockLabelLegacy(); blockLabel.FromLegacyAliquotOrder(aliquotOrder.AliquotOrderId, aliquotOrder.Label, reportNo, accessionOrder.PLastName, accessionOrder.PFirstName); this.m_BlockLabelQueue.Enqueue(blockLabel); aliquotOrder.Printed = true; } } } } }
public BlockLabelPrinter(string aliquotOrderId, string aliquotLabel, string masterAccessionNo, string pLastName, string pFirstName) { this.m_BlockLabelQueue = new Queue <BlockLabel>(); BlockLabel blockLabel = new BlockLabel(); blockLabel.FromAliquotOrder(aliquotOrderId, aliquotLabel, masterAccessionNo, pLastName, pFirstName); this.m_BlockLabelQueue.Enqueue(blockLabel); }