From 663fedf30ded0c11e9eb846669fa615a7795ccb2 Mon Sep 17 00:00:00 2001
From: yibo <361071264@qq.com>
Date: Wed, 14 Mar 2018 13:33:40 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=86=E5=89=B2=E5=93=81=E9=80=9A=E8=BF=87HT?=
=?UTF-8?q?ML=E6=A8=A1=E6=9D=BF=E6=89=93=E5=8D=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
SegmentationWeight/SegmentationWeight.csproj | 4 ++++
SegmentationWeight/SegmentationWeightForm.cs | 2 +-
SegmentationWeight/SegmentationWeightPrint.cs | 15 +++++++++++++++
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/SegmentationWeight/SegmentationWeight.csproj b/SegmentationWeight/SegmentationWeight.csproj
index a59cba2..e626074 100644
--- a/SegmentationWeight/SegmentationWeight.csproj
+++ b/SegmentationWeight/SegmentationWeight.csproj
@@ -33,6 +33,10 @@
..\TrunksIousOutInStore\bin\Debug\AutoMapper.dll
+
+ False
+ ..\..\..\tsref\Debug\BwpClientPrint.dll
+
False
..\..\..\tsref\Debug\Forks.EnterpriseServices.dll
diff --git a/SegmentationWeight/SegmentationWeightForm.cs b/SegmentationWeight/SegmentationWeightForm.cs
index 05a26f6..29c99ae 100644
--- a/SegmentationWeight/SegmentationWeightForm.cs
+++ b/SegmentationWeight/SegmentationWeightForm.cs
@@ -664,7 +664,7 @@ namespace SegmentationWeight
{
var entity = CreatePrintEntity(record);
//#if DEBUG
- SegmentationWeightPrint.Print(entity);
+ SegmentationWeightPrint.PrintByHTML(entity);
//#endif
//#if !DEBUG
// SegmentationWeightPrint.Print5050(entity);
diff --git a/SegmentationWeight/SegmentationWeightPrint.cs b/SegmentationWeight/SegmentationWeightPrint.cs
index 729ff6d..ed55917 100644
--- a/SegmentationWeight/SegmentationWeightPrint.cs
+++ b/SegmentationWeight/SegmentationWeightPrint.cs
@@ -56,6 +56,21 @@ namespace SegmentationWeight
PrintAPI.B_ClosePrn();
}
+ public static void PrintByHTML(PrintEntity entity)
+ {
+ var dic = new Dictionary();
+ dic.Add("$Goods_Name", entity.Goods_Name);
+ dic.Add("$Weight", entity.Weight);
+ dic.Add("$Date", entity.Date.ToString("yyyy/MM/dd"));
+ dic.Add("$Checker", entity.Checker);
+ dic.Add("$StoreCondition", entity.StoreCondition);
+ dic.Add("$TelNumber", entity.TelNumber);
+ dic.Add("$Place", entity.Place);
+ BwpClientPrint.BwpClientWebPrint.Create2DPic(entity._2DQRCode, "ImageUrl.png", 120);
+ dic.Add("$ImageUrl", "ImageUrl.png");
+ BwpClientPrint.BwpClientWebPrint.Print("SegmentationWeightPrint.html", dic);
+ }
+
public static void PrintEnd5050(PrintEntity entity)
{
PrintAPI.B_GetUSBBufferLen();