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++) { SpecimenLabel specimenLabel = this.m_SpecimenLabelQueue.Dequeue(); specimenLabel.DrawLabel(x, y, e); x = x + 106; count += 1; if (this.m_SpecimenLabelQueue.Count == 0) { break; } } if (this.m_SpecimenLabelQueue.Count == 0) { e.HasMorePages = false; } else { e.HasMorePages = true; } }
public SpecimenLabelPrinter(string aliquotOrderId, string aliquotLabel, string masterAccessionNo, string pLastName, string pFirstName) { this.m_SpecimenLabelQueue = new Queue <SpecimenLabel>(); SpecimenLabel specimenLabel = new SpecimenLabel(); specimenLabel.FromAliquotOrder(aliquotOrderId, aliquotLabel, masterAccessionNo, pLastName, pFirstName); this.m_SpecimenLabelQueue.Enqueue(specimenLabel); }
public SpecimenLabelPrinter(YellowstonePathology.Business.Test.AliquotOrderCollection aliquotOrderCollection, YellowstonePathology.Business.Test.AccessionOrder accessionOrder) { this.m_SpecimenLabelQueue = new Queue <SpecimenLabel>(); foreach (YellowstonePathology.Business.Test.AliquotOrder aliquotOrder in aliquotOrderCollection) { if (aliquotOrder.IsSpecimen() == true) { SpecimenLabel specimenLabel = new SpecimenLabel(); specimenLabel.FromAliquotOrder(aliquotOrder.AliquotOrderId, aliquotOrder.Label, accessionOrder.MasterAccessionNo, accessionOrder.PLastName, accessionOrder.PFirstName); this.m_SpecimenLabelQueue.Enqueue(specimenLabel); aliquotOrder.Printed = true; } } }