/// <summary>Specify a sheetDefNum of 0 for the internal Routing slip.</summary> private void PrintRoutingSlips(List <long> aptNums, long sheetDefNum) { SheetDef sheetDef; if (sheetDefNum == 0) { sheetDef = SheetsInternal.GetSheetDef(SheetInternalType.RoutingSlip); } else { sheetDef = SheetDefs.GetSheetDef(sheetDefNum); //includes fields and parameters } List <Sheet> sheetBatch = SheetUtil.CreateBatch(sheetDef, aptNums); if (sheetBatch.Count == 0) { MsgBox.Show(this, "There are no routing slips to print."); return; } try { SheetPrinting.PrintBatch(sheetBatch); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
///<summary></summary> public static void PrintCarriers(List <long> carrierNums) { SheetDef sheetDef = SheetsInternal.GetSheetDef(SheetInternalType.LabelCarrier); List <Sheet> sheetBatch = SheetUtil.CreateBatch(sheetDef, carrierNums); try{ SheetPrinting.PrintBatch(sheetBatch); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
///<summary></summary> public static void PrintCarriers(List <long> carrierNums) { SheetDef sheetDef; List <SheetDef> customSheetDefs = SheetDefs.GetCustomForType(SheetTypeEnum.LabelCarrier); if (customSheetDefs.Count == 0) { sheetDef = SheetsInternal.GetSheetDef(SheetInternalType.LabelCarrier); } else { sheetDef = customSheetDefs[0]; SheetDefs.GetFieldsAndParameters(sheetDef); } List <Sheet> sheetBatch = SheetUtil.CreateBatch(sheetDef, carrierNums); try{ SheetPrinting.PrintBatch(sheetBatch); } catch (Exception ex) { MessageBox.Show(ex.Message); } }