diff --git a/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.cs b/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.cs index 6ebe800..11ec8c1 100644 --- a/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.cs +++ b/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.cs @@ -42,7 +42,16 @@ namespace ButcherFactory.SegmentProduction_ dic.Add("$ImageUrl", imgUrl); var barImgUrl = string.Format(IMGFILE, id + "_bar"); - BwpClientPrint.BwpClientWebPrint.CreateBarCode("69212203" + entity.Goods_Code, barImgUrl, new Size(120, 40)); + try + { + BwpClientPrint.BwpClientWebPrint.CreateBarCode("69212203" + entity.Goods_Code, barImgUrl, new Size(120, 40)); + } + catch (Exception ex){ + if (ex.Message == "Contents do not pass checksum") + { + BwpClientPrint.BwpClientWebPrint.CreateBarCode("69738841" + entity.Goods_Code, barImgUrl, new Size(120, 40)); + } + } dic.Add("$BarImg", barImgUrl); string unit = entity.MainUnit; int rate =1;