private void printMaterial(Parcel parcel, PrintPageEventArgs e, Enums.CarrierDatabaseKey carrier) { LabelPrinter printer = null; switch (carrier) { case Enums.CarrierDatabaseKey.AUSTRALIA_POST: printer = new AustraliaPostPrinter(); break; case Enums.CarrierDatabaseKey.EPOST: printer = new EpostPrinter(); break; case Enums.CarrierDatabaseKey.TOLL: printer = new TollPrinter(); break; case Enums.CarrierDatabaseKey.HUNTER: printer = new HunterExpressPrinter(); break; } printer.PrintLabel(e.Graphics, currentInvoice, parcel); }
private void print_material_hunterexpress(Parcel p, PrintPageEventArgs e) { HunterExpressPrinter printer = new HunterExpressPrinter(); printer.PrintLabel(e.Graphics, temp_invoice, p); }