using BO.BO.Bill; using BWP.WinFormControl; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace QualityAndOrder { public static class HurryRecordPrint { public static void Print(HurryRecord entity) { PrintAPI.B_GetUSBBufferLen(); PrintAPI.B_EnumUSB(new byte[128]); PrintAPI.B_CreateUSBPort(1); PrintAPI.B_Prn_Text_TrueType(250, 15, 38, "宋体", 1, 700, 0, 0, 0, "C1", "急宰扫码"); PrintAPI.B_Bar2d_QR(45, 75, 2, 13, 'M', 'A', 0, 0, 0, entity.ID.ToString()); PrintAPI.B_Prn_Text_TrueType(335, 90, 32, "宋体", 1, 600, 0, 0, 0, "C2", string.Format("磅单号:{0}", entity.B3WeighBill_ID)); PrintAPI.B_Prn_Text_TrueType(335, 150, 32, "宋体", 1, 600, 0, 0, 0, "C3", string.Format("供应商:{0}", entity.Supplier_Name)); PrintAPI.B_Prn_Text_TrueType(335, 210, 32, "宋体", 1, 600, 0, 0, 0, "C4", string.Format("头 数:{0}", entity.HurryNumber)); PrintAPI.B_Prn_Text_TrueType(335, 270, 32, "宋体", 1, 600, 0, 0, 0, "C5", string.Format("时 间:{0}", entity.Time.ToString("MM/dd HH:mm"))); PrintAPI.B_Set_Direction('B'); PrintAPI.B_Print_Out(1); PrintAPI.B_ClosePrn(); } } }