diff --git a/CleanMachineHMI/CleanMachineHMI.csproj b/CleanMachineHMI/CleanMachineHMI.csproj
index fb74715..8a72720 100644
--- a/CleanMachineHMI/CleanMachineHMI.csproj
+++ b/CleanMachineHMI/CleanMachineHMI.csproj
@@ -91,6 +91,9 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
diff --git a/CleanMachineHMI/FrmUserControl/frmDayReport.Designer.cs b/CleanMachineHMI/FrmUserControl/frmDayReport.Designer.cs
index c269391..bd59239 100644
--- a/CleanMachineHMI/FrmUserControl/frmDayReport.Designer.cs
+++ b/CleanMachineHMI/FrmUserControl/frmDayReport.Designer.cs
@@ -49,6 +49,7 @@ namespace CleanMachineHMI.FrmUserControl
this.kdtp_CreateStartTime = new Krypton.Toolkit.KryptonDateTimePicker();
this.kryptonLabel5 = new Krypton.Toolkit.KryptonLabel();
this.kdtp_CreateEndTime = new Krypton.Toolkit.KryptonDateTimePicker();
+ this.kryptonButton1 = new Krypton.Toolkit.KryptonButton();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel2)).BeginInit();
this.kryptonPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox3)).BeginInit();
@@ -218,6 +219,7 @@ namespace CleanMachineHMI.FrmUserControl
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33444F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33112F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
+ this.tableLayoutPanel2.Controls.Add(this.kryptonButton1, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Reset, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.kbt_Query, 1, 0);
this.tableLayoutPanel2.Location = new System.Drawing.Point(727, 48);
@@ -314,6 +316,19 @@ namespace CleanMachineHMI.FrmUserControl
this.kdtp_CreateEndTime.Size = new System.Drawing.Size(246, 21);
this.kdtp_CreateEndTime.TabIndex = 7;
//
+ // kryptonButton1
+ //
+ this.kryptonButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.kryptonButton1.Location = new System.Drawing.Point(3, 3);
+ this.kryptonButton1.Name = "kryptonButton1";
+ this.kryptonButton1.Size = new System.Drawing.Size(91, 35);
+ this.kryptonButton1.TabIndex = 2;
+ this.kryptonButton1.Tag = "show";
+ this.kryptonButton1.Values.Text = "打印";
+ this.kryptonButton1.Click += new System.EventHandler(this.kryptonButton1_Click);
+ //
// frmDayReport
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -363,5 +378,6 @@ namespace CleanMachineHMI.FrmUserControl
private System.Windows.Forms.DataGridViewTextBoxColumn ColStartTime;
private System.Windows.Forms.DataGridViewTextBoxColumn ColEndTime;
private System.Windows.Forms.DataGridViewTextBoxColumn colOperators;
+ private Krypton.Toolkit.KryptonButton kryptonButton1;
}
}
diff --git a/CleanMachineHMI/FrmUserControl/frmDayReport.cs b/CleanMachineHMI/FrmUserControl/frmDayReport.cs
index d140b6c..e2686a8 100644
--- a/CleanMachineHMI/FrmUserControl/frmDayReport.cs
+++ b/CleanMachineHMI/FrmUserControl/frmDayReport.cs
@@ -107,8 +107,25 @@ namespace CleanMachineHMI.FrmUserControl
kdtp_CreateEndTime.Checked = false;
}
-
-
-
+ private void kryptonButton1_Click(object sender, EventArgs e)
+ {
+ var print = new frmPring();
+ try
+ {
+ print.Show();
+ var list = new CleanMachine.BLL.ZBK.DayReportBLL().GetReport(this.kdtp_CreateEndTime.Value, this.kdtp_CreateStartTime.Value);
+ FastReport.Report report = new FastReport.Report();
+ report.Load("ReportMd\\dayReport.frx");
+ report.RegisterData(list, "datas");
+ //report.Design();
+ report.PrintSettings.ShowDialog = false;
+ report.Prepare();
+ report.Print();
+ }
+ finally
+ {
+ print.Close();
+ }
+ }
}
}
diff --git a/CleanMachineHMI/FrmUserControl/frmMainDetail.cs b/CleanMachineHMI/FrmUserControl/frmMainDetail.cs
index 828be19..5c3e6b2 100644
--- a/CleanMachineHMI/FrmUserControl/frmMainDetail.cs
+++ b/CleanMachineHMI/FrmUserControl/frmMainDetail.cs
@@ -2624,7 +2624,20 @@ namespace CleanMachineHMI.FrmUserControl
LeadDbHelperSQLite.Execute(sqlTmp1);
}
}
- PrintWorkedIrMsg(ktb_IR.Text);
+
+ var print = new frmPring();
+ try
+ {
+ print.Show();
+ PrintWorkedIrMsg(ktb_IR.Text);
+ }
+ finally
+ {
+ print.Close();
+ }
+
+
+
//保存打印数据
string sqlInsertZbkWorkingPallet = $@"INSERT INTO ZBK_WORKING_PALLET SELECT * FROM CM_WORKING_PALLET WHERE WORKING_PALLET_CODE in (select WORKING_PALLET_CODE from CM_WORKING_PALLET_DTL where IR_CODE = '{ktb_IR.Text}' and WORKING_DTL_STATUS = 1)";
string sqlInsertZbkWorkingPalletDtl = $@"INSERT INTO ZBK_WORKING_PALLET_DTL SELECT * FROM CM_WORKING_PALLET_DTL WHERE WORKING_DTL_STATUS = 1 and IR_CODE = '{ktb_IR.Text}';";
diff --git a/CleanMachineHMI/FrmUserControl/frmOperatorReport.cs b/CleanMachineHMI/FrmUserControl/frmOperatorReport.cs
index 60cc635..3adc789 100644
--- a/CleanMachineHMI/FrmUserControl/frmOperatorReport.cs
+++ b/CleanMachineHMI/FrmUserControl/frmOperatorReport.cs
@@ -108,13 +108,25 @@ namespace CleanMachineHMI.FrmUserControl
private void kryptonButton1_Click(object sender, EventArgs e)
{
- var list = new CleanMachine.BLL.ZBK.DayReportBLL().GetOPReport(this.kdtp_CreateStartTime.Value, this.kdtp_CreateEndTime.Value);
- FastReport.Report report = new FastReport.Report();
- report.Load("ReportMd\\operatorReport.frx");
- report.RegisterData(list, "datas");
- //report.Design();
- report.Prepare();
- report.Print();
+ var print = new frmPring();
+ try
+ {
+ print.Show();
+ var list = new CleanMachine.BLL.ZBK.DayReportBLL().GetOPReport(this.kdtp_CreateStartTime.Value, this.kdtp_CreateEndTime.Value);
+ FastReport.Report report = new FastReport.Report();
+ report.Load("ReportMd\\operatorReport.frx");
+ report.RegisterData(list, "datas");
+ //report.Design();
+ report.PrintSettings.ShowDialog = false;
+ report.Prepare();
+ report.Print();
+ }
+ finally
+ {
+ print.Close();
+ }
+
+
}
}
}
diff --git a/CleanMachineHMI/ReportMd/dayReport.frx b/CleanMachineHMI/ReportMd/dayReport.frx
new file mode 100644
index 0000000..e84e008
--- /dev/null
+++ b/CleanMachineHMI/ReportMd/dayReport.frx
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CleanMachineHMI/Utils/PlcOperationHelper.cs b/CleanMachineHMI/Utils/PlcOperationHelper.cs
index 1e0da44..9778ac7 100644
--- a/CleanMachineHMI/Utils/PlcOperationHelper.cs
+++ b/CleanMachineHMI/Utils/PlcOperationHelper.cs
@@ -1195,7 +1195,7 @@ namespace CleanMachineHMI
try
{
#endif
- if (!this.IsConn) return false;
+ // if (!this.IsConn) return false;
switch (itemType)
{
case PlcItemTypeDesc.M:
diff --git a/CleanMachineHMI/frmPring.Designer.cs b/CleanMachineHMI/frmPring.Designer.cs
new file mode 100644
index 0000000..6b4aec0
--- /dev/null
+++ b/CleanMachineHMI/frmPring.Designer.cs
@@ -0,0 +1,69 @@
+namespace CleanMachineHMI
+{
+ partial class frmPring
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.label1 = new System.Windows.Forms.Label();
+ this.SuspendLayout();
+ //
+ // label1
+ //
+ this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.label1.AutoSize = true;
+ this.label1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.label1.Location = new System.Drawing.Point(99, 29);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(154, 24);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "printing ...";
+ //
+ // frmPring
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(355, 91);
+ this.Controls.Add(this.label1);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+ this.Name = "frmPring";
+ this.ShowIcon = false;
+ this.ShowInTaskbar = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "frmPring";
+ this.TopMost = true;
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label label1;
+ }
+}
\ No newline at end of file
diff --git a/CleanMachineHMI/frmPring.cs b/CleanMachineHMI/frmPring.cs
new file mode 100644
index 0000000..6edc4c0
--- /dev/null
+++ b/CleanMachineHMI/frmPring.cs
@@ -0,0 +1,21 @@
+using Krypton.Toolkit;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace CleanMachineHMI
+{
+ public partial class frmPring : KryptonForm
+ {
+ public frmPring()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/CleanMachineHMI/frmPring.resx b/CleanMachineHMI/frmPring.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/CleanMachineHMI/frmPring.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file