|
|
@@ -969,34 +969,11 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
string pib_outboxcode2 = LabelInf.Rows[rowindex].Cells["pib_outboxcode2"].Value.ToString();
|
|
|
DataTable dt = (DataTable)dh.ExecuteSql("select * from prodiooutinfo_view where 出货单号='" + pi_inoutno.Text + "' and 外箱号='" + pib_outboxcode2 + "'", "select");
|
|
|
- DataTable dt1 = dt.Clone();
|
|
|
- for (int i = 0; i < dt.Rows.Count; i++)
|
|
|
- {
|
|
|
- DataRow dr = dt1.NewRow();
|
|
|
- for (int j = 0; j < dt.Columns.Count; j++)
|
|
|
- {
|
|
|
- dr[j] = dt.Rows[i][j].ToString();
|
|
|
- }
|
|
|
- dt1.Rows.Add(dr);
|
|
|
- if ((i + 1) % 5 == 0 || (i + 1) == dt.Rows.Count)
|
|
|
- {
|
|
|
- OutReport.RegisterData(dt1, "prodiooutinfo_view");
|
|
|
- OutReport.GetDataSource("prodiooutinfo_view").Enabled = true;
|
|
|
- OutReport.PrintSettings.ShowDialog = false;
|
|
|
- OutReport.PrintSettings.Printer = OutBoxPrinter.Text;
|
|
|
-
|
|
|
- try
|
|
|
- {
|
|
|
- OutReport.Show();
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- MessageBox.Show(e.Message);
|
|
|
- return;
|
|
|
- }
|
|
|
- BaseUtil.CleanDataTableData(dt1);
|
|
|
- }
|
|
|
- }
|
|
|
+ OutReport.RegisterData(dt, "prodiooutinfo_view");
|
|
|
+ OutReport.GetDataSource("prodiooutinfo_view").Enabled = true;
|
|
|
+ OutReport.PrintSettings.ShowDialog = false;
|
|
|
+ OutReport.PrintSettings.Printer = OutBoxPrinter.Text;
|
|
|
+ OutReport.Print();
|
|
|
Properties.Settings.Default.OPrinter = OutBoxPrinter.Text;
|
|
|
Properties.Settings.Default.Save();
|
|
|
}
|