|
|
|
@ -11,6 +11,9 @@ namespace ButcherFactory.SegmentProduction_ |
|
|
|
public static class SegmentProductionPrint |
|
|
|
{ |
|
|
|
static int id = 1; |
|
|
|
const string PRINTFILE = @"PrintTemplate\SegmentProductionPrint.html"; |
|
|
|
const string ENDFILE = @"PrintTemplate\SegmentProductionPrintEnd.html"; |
|
|
|
const string IMGFILE = @"TempImg\_img{0}.png"; |
|
|
|
public static void Print(SegmentProduction entity, DateTime? dt) |
|
|
|
{ |
|
|
|
if (dt == null) |
|
|
|
@ -18,10 +21,10 @@ namespace ButcherFactory.SegmentProduction_ |
|
|
|
var dic = new Dictionary<string, string>(); |
|
|
|
dic.Add("$Goods_Name", entity.Goods_Name); |
|
|
|
dic.Add("$Date", dt.Value.ToString("yyyy/MM/dd")); |
|
|
|
var imgUrl = string.Format("TempImg\\_img{0}.png", id); |
|
|
|
var imgUrl = string.Format(IMGFILE, id); |
|
|
|
BwpClientPrint.BwpClientWebPrint.Create2DPic(entity.BarCode, imgUrl, 120); |
|
|
|
dic.Add("$ImageUrl", imgUrl); |
|
|
|
BwpClientPrint.BwpClientWebPrint.Print("PrintTemplate\\SegmentProductionPrint.html", dic); |
|
|
|
BwpClientPrint.BwpClientWebPrint.Print(PRINTFILE, dic); |
|
|
|
AfterPrint(); |
|
|
|
} |
|
|
|
|
|
|
|
@ -47,11 +50,11 @@ namespace ButcherFactory.SegmentProduction_ |
|
|
|
var dic = new Dictionary<string, string>(); |
|
|
|
dic.Add("$tableContent", builder.ToString()); |
|
|
|
var groupID = list.First().GroupID.ToString(); |
|
|
|
var imgUrl = string.Format("TempImg\\_img{0}.png", id); |
|
|
|
var imgUrl = string.Format(IMGFILE, id); |
|
|
|
BwpClientPrint.BwpClientWebPrint.Create2DPic(groupID, imgUrl, 120); |
|
|
|
dic.Add("$ImageUrl", imgUrl); |
|
|
|
dic.Add("$DateTime", DateTime.Now.ToString("yyyy/MM/dd HH:ss")); |
|
|
|
BwpClientPrint.BwpClientWebPrint.Print("PrintTemplate\\SegmentProductionPrintEnd.html", dic); |
|
|
|
BwpClientPrint.BwpClientWebPrint.Print(ENDFILE, dic); |
|
|
|
AfterPrint(); |
|
|
|
} |
|
|
|
|
|
|
|
|