Browse Source

分割品通过HTML模板打印

master
yibo 7 years ago
parent
commit
663fedf30d
3 changed files with 20 additions and 1 deletions
  1. +4
    -0
      SegmentationWeight/SegmentationWeight.csproj
  2. +1
    -1
      SegmentationWeight/SegmentationWeightForm.cs
  3. +15
    -0
      SegmentationWeight/SegmentationWeightPrint.cs

+ 4
- 0
SegmentationWeight/SegmentationWeight.csproj View File

@ -33,6 +33,10 @@
<Reference Include="AutoMapper"> <Reference Include="AutoMapper">
<HintPath>..\TrunksIousOutInStore\bin\Debug\AutoMapper.dll</HintPath> <HintPath>..\TrunksIousOutInStore\bin\Debug\AutoMapper.dll</HintPath>
</Reference> </Reference>
<Reference Include="BwpClientPrint, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\BwpClientPrint.dll</HintPath>
</Reference>
<Reference Include="Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"> <Reference Include="Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\Forks.EnterpriseServices.dll</HintPath> <HintPath>..\..\..\tsref\Debug\Forks.EnterpriseServices.dll</HintPath>


+ 1
- 1
SegmentationWeight/SegmentationWeightForm.cs View File

@ -664,7 +664,7 @@ namespace SegmentationWeight
{ {
var entity = CreatePrintEntity(record); var entity = CreatePrintEntity(record);
//#if DEBUG //#if DEBUG
SegmentationWeightPrint.Print(entity);
SegmentationWeightPrint.PrintByHTML(entity);
//#endif //#endif
//#if !DEBUG //#if !DEBUG
// SegmentationWeightPrint.Print5050(entity); // SegmentationWeightPrint.Print5050(entity);


+ 15
- 0
SegmentationWeight/SegmentationWeightPrint.cs View File

@ -56,6 +56,21 @@ namespace SegmentationWeight
PrintAPI.B_ClosePrn(); PrintAPI.B_ClosePrn();
} }
public static void PrintByHTML(PrintEntity entity)
{
var dic = new Dictionary<string, string>();
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) public static void PrintEnd5050(PrintEntity entity)
{ {
PrintAPI.B_GetUSBBufferLen(); PrintAPI.B_GetUSBBufferLen();


Loading…
Cancel
Save