48 lines
1.1 KiB
C#
48 lines
1.1 KiB
C#
|
|
using System;
|
|||
|
|
using System.Drawing;
|
|||
|
|
using System.Collections;
|
|||
|
|
using System.ComponentModel;
|
|||
|
|
using DevExpress.XtraReports.UI;
|
|||
|
|
using System.Data;
|
|||
|
|
using System.IO;
|
|||
|
|
using System.Reflection;
|
|||
|
|
|
|||
|
|
namespace WMS.FrmPrint
|
|||
|
|
{
|
|||
|
|
public partial class RkBoxCode : DevExpress.XtraReports.UI.XtraReport
|
|||
|
|
{
|
|||
|
|
public RkBoxCode()
|
|||
|
|
{
|
|||
|
|
InitializeComponent();
|
|||
|
|
this.ShowPrintStatusDialog = false;
|
|||
|
|
}
|
|||
|
|
public void SetBindData(DataTable table)
|
|||
|
|
{
|
|||
|
|
string appPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName);
|
|||
|
|
if (File.Exists(appPath + "\\barcode\\菜鸟电子面单.repx"))
|
|||
|
|
{
|
|||
|
|
this.LoadLayout(appPath + "\\barcode\\菜鸟电子面单.repx");
|
|||
|
|
}
|
|||
|
|
this.DataSource = table;
|
|||
|
|
|
|||
|
|
|
|||
|
|
PrintData();
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
public void PrintData()
|
|||
|
|
{
|
|||
|
|
//DevExpress.Printing.v16.2.Core
|
|||
|
|
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
this.Print();
|
|||
|
|
}
|
|||
|
|
catch(Exception ex)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|