|
|
@@ -86,6 +86,7 @@ namespace UAS_Web.tool
|
|
|
//弹出打印机选择列表
|
|
|
print = new PrinterList(browser) { StartPosition = FormStartPosition.CenterScreen,TopMost=true };
|
|
|
print.Controls["Confirm"].Click += RequestHandler_Click;
|
|
|
+ print.PrintDoc.PrintPage += PrintPage;
|
|
|
print.ShowDialog();
|
|
|
break;
|
|
|
case "zplPrint.action":
|
|
|
@@ -126,12 +127,17 @@ namespace UAS_Web.tool
|
|
|
DataTable dt = new DataTable();
|
|
|
RadioButton PRFR = (RadioButton)print.Controls["PRFR"];
|
|
|
RadioButton PRPIC = (RadioButton)print.Controls["PRPIC"];
|
|
|
-
|
|
|
string type;
|
|
|
bitmaps.Clear();
|
|
|
- filter = FilterManager.GetFileter(request.Identifier.ToString()) as MessageFilter;
|
|
|
- str = System.Text.Encoding.UTF8.GetString(filter.dataAll.ToArray());
|
|
|
- data = ToDictionary(str);
|
|
|
+ try
|
|
|
+ {
|
|
|
+ filter = FilterManager.GetFileter(request.Identifier.ToString()) as MessageFilter;
|
|
|
+ str = System.Text.Encoding.UTF8.GetString(filter.dataAll.ToArray());
|
|
|
+ data = ToDictionary(str);
|
|
|
+ }
|
|
|
+ catch {
|
|
|
+ return;
|
|
|
+ }
|
|
|
List<Dictionary<string, object>> parameter = new List<Dictionary<string, object>>();
|
|
|
List<Dictionary<string, object>> barcode = new List<Dictionary<string, object>>();
|
|
|
parameter = (List<Dictionary<string, object>>)data["parameter"];
|
|
|
@@ -155,7 +161,7 @@ namespace UAS_Web.tool
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- Report.Load(System.AppDomain.CurrentDomain.BaseDirectory + "GD.frx");
|
|
|
+ Report.Load(System.AppDomain.CurrentDomain.BaseDirectory + "GD_纵向.frx");
|
|
|
}
|
|
|
}
|
|
|
catch
|
|
|
@@ -295,10 +301,13 @@ namespace UAS_Web.tool
|
|
|
}
|
|
|
if (PRPIC.Checked)
|
|
|
{
|
|
|
- imagecount = bitmaps.Count;
|
|
|
- ////设置打印机名称
|
|
|
- print.PrintDoc.PrintPage += PrintPage;
|
|
|
- print.PrintDoc.Print();
|
|
|
+ if (bitmaps.Count > 0)
|
|
|
+ {
|
|
|
+ imagecount = bitmaps.Count;
|
|
|
+ ////设置打印机名称
|
|
|
+
|
|
|
+ print.PrintDoc.Print();
|
|
|
+ }
|
|
|
}
|
|
|
if(PRFR.Checked)
|
|
|
{
|