internal void PrintBarcodeLable(string json) { if (!string.IsNullOrEmpty(json)) { PrintCommodityEntity printCommodityEntity = JsonConvert.DeserializeObject <PrintCommodityEntity>(json); List <CommodityEntity> commodityEntityList = printCommodityEntity.commodityList; if (commodityEntityList != null) { foreach (CommodityEntity item in commodityEntityList) { SendBarcodeLabel(item, printCommodityEntity.number); Thread.Sleep(3000); } NewUsb.CloseUSBPort(); } } }
internal void PrintCommodotyLabel(string json) { if (Connect_Printer()) { PrintCommodityEntity printCommodityEntity = JsonConvert.DeserializeObject <PrintCommodityEntity>(json); List <CommodityEntity> commodityEntityList = printCommodityEntity.commodityList; if (commodityEntityList != null) { foreach (CommodityEntity item in commodityEntityList) { SendBLineLabel(item, printCommodityEntity.number); } } } else { logger.Info("条码标签打印机连接失败"); } }
/// <summary> /// 打印服装版商品标签 /// </summary> /// <param name="s"></param> internal void PrintGarmentLabel(string commodityInfo) { if (Connect_Printer()) { if (!string.IsNullOrEmpty(commodityInfo)) { PrintCommodityEntity printCommodityEntity = JsonConvert.DeserializeObject <PrintCommodityEntity>(commodityInfo); List <CommodityEntity> commodityEntityList = printCommodityEntity.commodityList; if (commodityEntityList != null) { foreach (CommodityEntity item in commodityEntityList) { SendGarmentLabel(item, printCommodityEntity.number); Thread.Sleep(3000); } NewUsb.CloseUSBPort(); } } } else { logger.Info("连接标签打印机失败 GprinterUtils"); } }