liulb@mesnac.com 1 year ago
parent d8820d5b22
commit 4b839ee6b1

@ -1129,10 +1129,6 @@ namespace Mesnac.Action.ChemicalWeighing
/// 计划排序 /// 计划排序
/// </summary> /// </summary>
public DataKeyValue plt_Set_Plan_Serial = new DataKeyValue("DB114.DBW126"); public DataKeyValue plt_Set_Plan_Serial = new DataKeyValue("DB114.DBW126");
/// <summary>
/// 产前检查
/// </summary>
public DataKeyValue plt_Set_Plan_Check = new DataKeyValue("DB114.DBW128");
#endregion #endregion
#region 配方 DB110 #region 配方 DB110
@ -1800,6 +1796,10 @@ namespace Mesnac.Action.ChemicalWeighing
/// PLC——小料 /// PLC——小料
/// </summary> /// </summary>
public DataKeyValue plt_plc_SystemRunning = new DataKeyValue("DB104.DBX4.1"); public DataKeyValue plt_plc_SystemRunning = new DataKeyValue("DB104.DBX4.1");
/// <summary>
/// 下传产前计划标识
/// </summary>
public DataKeyValue plt_plc_Spare7 = new DataKeyValue("DB104.DBX187.6");
#endregion #endregion
#region 普力通上位机-溶剂 #region 普力通上位机-溶剂

@ -267,7 +267,7 @@ namespace Mesnac.Action.ChemicalWeighing.BinManage
{ {
try try
{ {
using (IFreeSql fsql = FreeHelper.Instance) IFreeSql fsql = FreeHelper.Instance;
{ {
fsql.Transaction(() => fsql.Transaction(() =>
{ {

@ -141,10 +141,6 @@ namespace Mesnac.Action.ChemicalWeighing.FinishBatch
{ {
ICSharpCode.Core.LoggingService<FinishBatchService>.Error(ex.Message, ex); ICSharpCode.Core.LoggingService<FinishBatchService>.Error(ex.Message, ex);
} }
finally
{
}
} }
#endregion #endregion
} }

@ -102,9 +102,10 @@ namespace Mesnac.Action.ChemicalWeighing.Technical.XlRecipe
_mixerLine = 0; _mixerLine = 0;
_groupBags = pmt_Recipe.GroupBags.ToString(); _groupBags = pmt_Recipe.GroupBags.ToString();
_remark = pmt_Recipe.Remark; _remark = pmt_Recipe.Remark;
decimal total_Weight = Convert.ToDecimal(pmt_Recipe.Total_Weight);
decimal totalError = Convert.ToDecimal(pmt_Recipe.Total_Error); decimal totalError = Convert.ToDecimal(pmt_Recipe.Total_Error);
FrmRecipMag frmUpdateRecipe = new FrmRecipMag(ActionType.Modify, selectRecipeID, _recipeCode, _recipeName, pmt_Recipe.Version, _remark, totalError); FrmRecipMag frmUpdateRecipe = new FrmRecipMag(ActionType.Modify, selectRecipeID, _recipeCode, _recipeName, pmt_Recipe.Version, _remark, total_Weight, totalError);
frmUpdateRecipe.ShowDialog(this._runtime.BaseControl.MCRoot as Control); frmUpdateRecipe.ShowDialog(this._runtime.BaseControl.MCRoot as Control);
if (frmUpdateRecipe.DialogResult == DialogResult.OK) if (frmUpdateRecipe.DialogResult == DialogResult.OK)
{ {

@ -46,30 +46,36 @@
this.checkBox1 = new System.Windows.Forms.CheckBox(); this.checkBox1 = new System.Windows.Forms.CheckBox();
this.btnOk = new System.Windows.Forms.Button(); this.btnOk = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button(); this.btnCancel = new System.Windows.Forms.Button();
this.label7 = new System.Windows.Forms.Label();
this.txtTotalWeight = new System.Windows.Forms.TextBox();
this.chcWeight = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.cmbRecipeVersion); this.groupBox1.Controls.Add(this.cmbRecipeVersion);
this.groupBox1.Controls.Add(this.chcWeight);
this.groupBox1.Controls.Add(this.chcIsEnable); this.groupBox1.Controls.Add(this.chcIsEnable);
this.groupBox1.Controls.Add(this.txtRecipeName); this.groupBox1.Controls.Add(this.txtRecipeName);
this.groupBox1.Controls.Add(this.label6); this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label21); this.groupBox1.Controls.Add(this.label21);
this.groupBox1.Controls.Add(this.textRecipeCode); this.groupBox1.Controls.Add(this.textRecipeCode);
this.groupBox1.Controls.Add(this.txtTotalWeight);
this.groupBox1.Controls.Add(this.txtTotalError); this.groupBox1.Controls.Add(this.txtTotalError);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.txtRemark); this.groupBox1.Controls.Add(this.txtRemark);
this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.lblVersion); this.groupBox1.Controls.Add(this.lblVersion);
this.groupBox1.Controls.Add(this.label4); this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label1); this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Location = new System.Drawing.Point(31, 15); this.groupBox1.Location = new System.Drawing.Point(35, 18);
this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4); this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBox1.Size = new System.Drawing.Size(745, 290); this.groupBox1.Size = new System.Drawing.Size(1004, 412);
this.groupBox1.TabIndex = 10; this.groupBox1.TabIndex = 10;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
// //
@ -99,20 +105,20 @@
"18", "18",
"19", "19",
"20"}); "20"});
this.cmbRecipeVersion.Location = new System.Drawing.Point(195, 72); this.cmbRecipeVersion.Location = new System.Drawing.Point(219, 91);
this.cmbRecipeVersion.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.cmbRecipeVersion.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.cmbRecipeVersion.Name = "cmbRecipeVersion"; this.cmbRecipeVersion.Name = "cmbRecipeVersion";
this.cmbRecipeVersion.Size = new System.Drawing.Size(357, 32); this.cmbRecipeVersion.Size = new System.Drawing.Size(401, 37);
this.cmbRecipeVersion.TabIndex = 10; this.cmbRecipeVersion.TabIndex = 10;
// //
// chcIsEnable // chcIsEnable
// //
this.chcIsEnable.AutoSize = true; this.chcIsEnable.AutoSize = true;
this.chcIsEnable.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold); this.chcIsEnable.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold);
this.chcIsEnable.Location = new System.Drawing.Point(565, 168); this.chcIsEnable.Location = new System.Drawing.Point(638, 255);
this.chcIsEnable.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.chcIsEnable.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.chcIsEnable.Name = "chcIsEnable"; this.chcIsEnable.Name = "chcIsEnable";
this.chcIsEnable.Size = new System.Drawing.Size(157, 28); this.chcIsEnable.Size = new System.Drawing.Size(189, 33);
this.chcIsEnable.TabIndex = 10; this.chcIsEnable.TabIndex = 10;
this.chcIsEnable.Text = "修改总误差"; this.chcIsEnable.Text = "修改总误差";
this.chcIsEnable.UseVisualStyleBackColor = true; this.chcIsEnable.UseVisualStyleBackColor = true;
@ -121,20 +127,20 @@
// txtRecipeName // txtRecipeName
// //
this.txtRecipeName.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtRecipeName.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtRecipeName.Location = new System.Drawing.Point(195, 34); this.txtRecipeName.Location = new System.Drawing.Point(219, 41);
this.txtRecipeName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtRecipeName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtRecipeName.Name = "txtRecipeName"; this.txtRecipeName.Name = "txtRecipeName";
this.txtRecipeName.Size = new System.Drawing.Size(357, 35); this.txtRecipeName.Size = new System.Drawing.Size(401, 40);
this.txtRecipeName.TabIndex = 7; this.txtRecipeName.TabIndex = 7;
// //
// label6 // label6
// //
this.label6.AutoSize = true; this.label6.AutoSize = true;
this.label6.ForeColor = System.Drawing.Color.Red; this.label6.ForeColor = System.Drawing.Color.Red;
this.label6.Location = new System.Drawing.Point(161, 126); this.label6.Location = new System.Drawing.Point(181, 151);
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label6.Name = "label6"; this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(15, 15); this.label6.Size = new System.Drawing.Size(17, 18);
this.label6.TabIndex = 3; this.label6.TabIndex = 3;
this.label6.Text = "*"; this.label6.Text = "*";
this.label6.Click += new System.EventHandler(this.label3_Click); this.label6.Click += new System.EventHandler(this.label3_Click);
@ -143,10 +149,10 @@
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.ForeColor = System.Drawing.Color.Red; this.label3.ForeColor = System.Drawing.Color.Red;
this.label3.Location = new System.Drawing.Point(161, 79); this.label3.Location = new System.Drawing.Point(181, 100);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(15, 15); this.label3.Size = new System.Drawing.Size(17, 18);
this.label3.TabIndex = 3; this.label3.TabIndex = 3;
this.label3.Text = "*"; this.label3.Text = "*";
this.label3.Click += new System.EventHandler(this.label3_Click); this.label3.Click += new System.EventHandler(this.label3_Click);
@ -155,20 +161,20 @@
// //
this.label21.AutoSize = true; this.label21.AutoSize = true;
this.label21.ForeColor = System.Drawing.Color.Red; this.label21.ForeColor = System.Drawing.Color.Red;
this.label21.Location = new System.Drawing.Point(161, 45); this.label21.Location = new System.Drawing.Point(181, 54);
this.label21.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label21.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label21.Name = "label21"; this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(15, 15); this.label21.Size = new System.Drawing.Size(17, 18);
this.label21.TabIndex = 3; this.label21.TabIndex = 3;
this.label21.Text = "*"; this.label21.Text = "*";
// //
// textRecipeCode // textRecipeCode
// //
this.textRecipeCode.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.textRecipeCode.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textRecipeCode.Location = new System.Drawing.Point(195, 118); this.textRecipeCode.Location = new System.Drawing.Point(219, 142);
this.textRecipeCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.textRecipeCode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.textRecipeCode.Name = "textRecipeCode"; this.textRecipeCode.Name = "textRecipeCode";
this.textRecipeCode.Size = new System.Drawing.Size(357, 35); this.textRecipeCode.Size = new System.Drawing.Size(401, 40);
this.textRecipeCode.TabIndex = 2; this.textRecipeCode.TabIndex = 2;
this.textRecipeCode.TextChanged += new System.EventHandler(this.txtTotalError_TextChanged); this.textRecipeCode.TextChanged += new System.EventHandler(this.txtTotalError_TextChanged);
// //
@ -176,31 +182,31 @@
// //
this.txtTotalError.Enabled = false; this.txtTotalError.Enabled = false;
this.txtTotalError.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtTotalError.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtTotalError.Location = new System.Drawing.Point(195, 161); this.txtTotalError.Location = new System.Drawing.Point(219, 246);
this.txtTotalError.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtTotalError.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtTotalError.Name = "txtTotalError"; this.txtTotalError.Name = "txtTotalError";
this.txtTotalError.Size = new System.Drawing.Size(357, 35); this.txtTotalError.Size = new System.Drawing.Size(401, 40);
this.txtTotalError.TabIndex = 2; this.txtTotalError.TabIndex = 2;
this.txtTotalError.TextChanged += new System.EventHandler(this.txtTotalError_TextChanged); this.txtTotalError.TextChanged += new System.EventHandler(this.txtTotalError_TextChanged);
// //
// txtRemark // txtRemark
// //
this.txtRemark.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtRemark.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtRemark.Location = new System.Drawing.Point(195, 201); this.txtRemark.Location = new System.Drawing.Point(219, 295);
this.txtRemark.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtRemark.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtRemark.Multiline = true; this.txtRemark.Multiline = true;
this.txtRemark.Name = "txtRemark"; this.txtRemark.Name = "txtRemark";
this.txtRemark.Size = new System.Drawing.Size(357, 81); this.txtRemark.Size = new System.Drawing.Size(401, 96);
this.txtRemark.TabIndex = 2; this.txtRemark.TabIndex = 2;
// //
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label2.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(15, 166); this.label2.Location = new System.Drawing.Point(17, 252);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(135, 24); this.label2.Size = new System.Drawing.Size(163, 29);
this.label2.TabIndex = 1; this.label2.TabIndex = 1;
this.label2.Text = "设置总误差"; this.label2.Text = "设置总误差";
// //
@ -208,10 +214,10 @@
// //
this.label5.AutoSize = true; this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label5.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.Location = new System.Drawing.Point(37, 121); this.label5.Location = new System.Drawing.Point(42, 145);
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(110, 24); this.label5.Size = new System.Drawing.Size(133, 29);
this.label5.TabIndex = 1; this.label5.TabIndex = 1;
this.label5.Text = "配方编码"; this.label5.Text = "配方编码";
// //
@ -219,10 +225,10 @@
// //
this.lblVersion.AutoSize = true; this.lblVersion.AutoSize = true;
this.lblVersion.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblVersion.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblVersion.Location = new System.Drawing.Point(91, 71); this.lblVersion.Location = new System.Drawing.Point(102, 90);
this.lblVersion.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lblVersion.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblVersion.Name = "lblVersion"; this.lblVersion.Name = "lblVersion";
this.lblVersion.Size = new System.Drawing.Size(60, 24); this.lblVersion.Size = new System.Drawing.Size(73, 29);
this.lblVersion.TabIndex = 1; this.lblVersion.TabIndex = 1;
this.lblVersion.Text = "版本"; this.lblVersion.Text = "版本";
// //
@ -230,10 +236,10 @@
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label4.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.Location = new System.Drawing.Point(41, 202); this.label4.Location = new System.Drawing.Point(46, 295);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(110, 24); this.label4.Size = new System.Drawing.Size(133, 29);
this.label4.TabIndex = 1; this.label4.TabIndex = 1;
this.label4.Text = "备注信息"; this.label4.Text = "备注信息";
// //
@ -241,10 +247,10 @@
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(15, 38); this.label1.Location = new System.Drawing.Point(17, 46);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(135, 24); this.label1.Size = new System.Drawing.Size(163, 29);
this.label1.TabIndex = 0; this.label1.TabIndex = 0;
this.label1.Text = "新配方名称"; this.label1.Text = "新配方名称";
// //
@ -254,10 +260,10 @@
this.checkBox1.Checked = true; this.checkBox1.Checked = true;
this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked; this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold); this.checkBox1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold);
this.checkBox1.Location = new System.Drawing.Point(51, 311); this.checkBox1.Location = new System.Drawing.Point(57, 443);
this.checkBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.checkBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.checkBox1.Name = "checkBox1"; this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(132, 28); this.checkBox1.Size = new System.Drawing.Size(159, 33);
this.checkBox1.TabIndex = 13; this.checkBox1.TabIndex = 13;
this.checkBox1.Text = "是否启用"; this.checkBox1.Text = "是否启用";
this.checkBox1.UseVisualStyleBackColor = true; this.checkBox1.UseVisualStyleBackColor = true;
@ -266,12 +272,12 @@
// btnOk // btnOk
// //
this.btnOk.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnOk.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOk.Location = new System.Drawing.Point(567, 312); this.btnOk.Location = new System.Drawing.Point(423, 443);
this.btnOk.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnOk.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btnOk.Name = "btnOk"; this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(96, 40); this.btnOk.Size = new System.Drawing.Size(176, 48);
this.btnOk.TabIndex = 11; this.btnOk.TabIndex = 11;
this.btnOk.Text = "确定(&O)"; this.btnOk.Text = "确定";
this.btnOk.UseVisualStyleBackColor = true; this.btnOk.UseVisualStyleBackColor = true;
this.btnOk.Click += new System.EventHandler(this.btnOk_Click); this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
// //
@ -279,24 +285,60 @@
// //
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCancel.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCancel.Location = new System.Drawing.Point(671, 312); this.btnCancel.Location = new System.Drawing.Point(622, 443);
this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btnCancel.Name = "btnCancel"; this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(96, 40); this.btnCancel.Size = new System.Drawing.Size(150, 48);
this.btnCancel.TabIndex = 12; this.btnCancel.TabIndex = 12;
this.btnCancel.Text = "取消(&C)"; this.btnCancel.Text = "取消";
this.btnCancel.UseVisualStyleBackColor = true; this.btnCancel.UseVisualStyleBackColor = true;
// //
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label7.Location = new System.Drawing.Point(17, 202);
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(163, 29);
this.label7.TabIndex = 1;
this.label7.Text = "设置总重量";
//
// txtTotalWeight
//
this.txtTotalWeight.Enabled = false;
this.txtTotalWeight.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtTotalWeight.Location = new System.Drawing.Point(219, 196);
this.txtTotalWeight.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtTotalWeight.Name = "txtTotalWeight";
this.txtTotalWeight.Size = new System.Drawing.Size(401, 40);
this.txtTotalWeight.TabIndex = 2;
this.txtTotalWeight.TextChanged += new System.EventHandler(this.txtTotalError_TextChanged);
//
// chcWeight
//
this.chcWeight.AutoSize = true;
this.chcWeight.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold);
this.chcWeight.ForeColor = System.Drawing.Color.Red;
this.chcWeight.Location = new System.Drawing.Point(639, 202);
this.chcWeight.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.chcWeight.Name = "chcWeight";
this.chcWeight.Size = new System.Drawing.Size(341, 33);
this.chcWeight.TabIndex = 10;
this.chcWeight.Text = "修改总重量(产前检测)";
this.chcWeight.UseVisualStyleBackColor = true;
this.chcWeight.CheckedChanged += new System.EventHandler(this.chcWeight_CheckedChanged);
//
// FrmRecipMag // FrmRecipMag
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(811, 372); this.ClientSize = new System.Drawing.Size(1073, 524);
this.Controls.Add(this.checkBox1); this.Controls.Add(this.checkBox1);
this.Controls.Add(this.btnOk); this.Controls.Add(this.btnOk);
this.Controls.Add(this.btnCancel); this.Controls.Add(this.btnCancel);
this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox1);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Name = "FrmRecipMag"; this.Name = "FrmRecipMag";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "配方管理"; this.Text = "配方管理";
@ -328,5 +370,8 @@
private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox textRecipeCode; private System.Windows.Forms.TextBox textRecipeCode;
private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtTotalWeight;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.CheckBox chcWeight;
} }
} }

@ -24,13 +24,14 @@ namespace Mesnac.Action.ChemicalWeighing.Technical.XlRecipe
string version = string.Empty; string version = string.Empty;
string remark = string.Empty; string remark = string.Empty;
decimal totalError = 0; decimal totalError = 0;
decimal totalWeight = 0;
private Entity.xl_recipe pmt_Recipe = null; private Entity.xl_recipe pmt_Recipe = null;
private string _curRecipeID = null; private string _curRecipeID = null;
public FrmRecipMag() public FrmRecipMag()
{ {
InitializeComponent(); InitializeComponent();
} }
public FrmRecipMag(ActionType actionType,string _selectRecipeID, string _recipeCode, string _recipeName, string _version, string _remark, decimal _totalError) public FrmRecipMag(ActionType actionType,string _selectRecipeID, string _recipeCode, string _recipeName, string _version, string _remark, decimal _totalWeight, decimal _totalError)
{ {
InitializeComponent(); InitializeComponent();
_actionType = actionType; _actionType = actionType;
@ -42,6 +43,7 @@ namespace Mesnac.Action.ChemicalWeighing.Technical.XlRecipe
recipeName = _recipeName; recipeName = _recipeName;
version = _version; version = _version;
remark = _remark; remark = _remark;
totalWeight = _totalWeight;
totalError = _totalError; totalError = _totalError;
pmt_Recipe = RecipeHelper.GetRecipeByName(selectRecipeID); pmt_Recipe = RecipeHelper.GetRecipeByName(selectRecipeID);
@ -118,11 +120,12 @@ namespace Mesnac.Action.ChemicalWeighing.Technical.XlRecipe
{ {
this.txtRecipeName.Text = recipeName; this.txtRecipeName.Text = recipeName;
this.cmbRecipeVersion.Text = version; this.cmbRecipeVersion.Text = version;
this.txtTotalWeight.Text = totalWeight.ToString("f3");
this.txtTotalError.Text = totalError.ToString("f3"); this.txtTotalError.Text = totalError.ToString("f3");
this.textRecipeCode.Text = recipeCode; this.textRecipeCode.Text = recipeCode;
this.txtRemark.Text = remark; this.txtRemark.Text = remark;
//if (pmt_Recipe.Recipe_Verify == 1) //if (pmt_Recipe.Recipe_Verify == 1)
//{ //{
// checkBox1.Checked = true; // checkBox1.Checked = true;
@ -131,9 +134,9 @@ namespace Mesnac.Action.ChemicalWeighing.Technical.XlRecipe
//{ //{
// checkBox1.Checked = false; // checkBox1.Checked = false;
//} //}
this.chcIsEnable.Checked = true; // this.chcIsEnable.Checked = true;
checkBox1.Checked = true; this.checkBox1.Checked = true;
//this.chcWeight.Checked= true;
} }
#region 向数据库中插入新配方数据 #region 向数据库中插入新配方数据
@ -157,7 +160,7 @@ namespace Mesnac.Action.ChemicalWeighing.Technical.XlRecipe
{ {
pmt_Recipe.Recipe_Verify = 0; pmt_Recipe.Recipe_Verify = 0;
} }
//pmt_Recipe.Total_Weight = _totalWeight;
if (chcIsEnable.Checked) if (chcIsEnable.Checked)
{ {
pmt_Recipe.Total_Error = Convert.ToDecimal(this.txtTotalError.Text); pmt_Recipe.Total_Error = Convert.ToDecimal(this.txtTotalError.Text);
@ -166,7 +169,14 @@ namespace Mesnac.Action.ChemicalWeighing.Technical.XlRecipe
{ {
pmt_Recipe.Total_Error = 0; pmt_Recipe.Total_Error = 0;
} }
if (chcWeight.Checked)
{
pmt_Recipe.Total_Weight =Convert.ToDecimal(this.txtTotalWeight.Text);
}
else
{
pmt_Recipe.Total_Weight = 0;
}
_curRecipeID = RecipeHelper.InsertRecipe(pmt_Recipe); _curRecipeID = RecipeHelper.InsertRecipe(pmt_Recipe);
} }
#endregion #endregion
@ -192,5 +202,17 @@ namespace Mesnac.Action.ChemicalWeighing.Technical.XlRecipe
{ {
} }
private void chcWeight_CheckedChanged(object sender, EventArgs e)
{
if (chcWeight.Checked)
{
txtTotalWeight.Enabled = true;
}
else
{
txtTotalWeight.Enabled = false;
}
}
} }
} }

@ -335,7 +335,7 @@ namespace Mesnac.Action.ChemicalWeighing.XlPlcHelper
//BasePlcHelper.Instance.PlcWriteByDataKey(BasePlcHelper.Instance.plt_Set_RecipeName, new object[] { item.Recipe_Name }); //配方名称 //BasePlcHelper.Instance.PlcWriteByDataKey(BasePlcHelper.Instance.plt_Set_RecipeName, new object[] { item.Recipe_Name }); //配方名称
BasePlcHelper.Instance.PlcWriteByDataKey(BasePlcHelper.Instance.plt_Set_Batch, new object[] { item.Plan_Num });//设定执行数量 BasePlcHelper.Instance.PlcWriteByDataKey(BasePlcHelper.Instance.plt_Set_Batch, new object[] { item.Plan_Num });//设定执行数量
BasePlcHelper.Instance.PlcWriteByDataKey(BasePlcHelper.Instance.plt_Set_Plan_Serial, new object[] { item.Plan_Serial }); //计划号 BasePlcHelper.Instance.PlcWriteByDataKey(BasePlcHelper.Instance.plt_Set_Plan_Serial, new object[] { item.Plan_Serial }); //计划号
BasePlcHelper.Instance.PlcWriteByDataKey(BasePlcHelper.Instance.plt_Set_Plan_Check, new object[] { item.IsPrenatalTest });//是否产前检查表标识 BasePlcHelper.Instance.PlcWriteByDataKey(BasePlcHelper.Instance.plt_plc_Spare7, new object[] { item.IsPrenatalTest });//是否产前检查表标识
} }
switch (item.Station) switch (item.Station)
{ {

@ -270,7 +270,7 @@
<Data name="line3_pho-to_sensor_1" runname="DB104.DBX187.3" start="93" len="1" method="Default_Bit(11,1)" max="" issave="True" subtractor="" remark="3线定位开关1" /> <Data name="line3_pho-to_sensor_1" runname="DB104.DBX187.3" start="93" len="1" method="Default_Bit(11,1)" max="" issave="True" subtractor="" remark="3线定位开关1" />
<Data name="line3_pho-to_sensor_2" runname="DB104.DBX187.4" start="93" len="1" method="Default_Bit(12,1)" max="" issave="True" subtractor="" remark="3线定位开关2" /> <Data name="line3_pho-to_sensor_2" runname="DB104.DBX187.4" start="93" len="1" method="Default_Bit(12,1)" max="" issave="True" subtractor="" remark="3线定位开关2" />
<Data name="line3_pho-to_sensor_3" runname="DB104.DBX187.5" start="93" len="1" method="Default_Bit(13,1)" max="" issave="True" subtractor="" remark="3线定位开关3" /> <Data name="line3_pho-to_sensor_3" runname="DB104.DBX187.5" start="93" len="1" method="Default_Bit(13,1)" max="" issave="True" subtractor="" remark="3线定位开关3" />
<Data name="Spare7" runname="DB104.DBX187.6" start="93" len="1" method="Default_Bit(14,1)" max="" issave="True" subtractor="" remark="备用" /> <Data name="Spare7" runname="DB104.DBX187.6" start="93" len="1" method="Default_Bit(14,1)" max="" issave="True" subtractor="" remark="下传产前检测1" />
<Data name="Spare8" runname="DB104.DBX187.7" start="93" len="1" method="Default_Bit(15,1)" max="" issave="True" subtractor="" remark="备用" /> <Data name="Spare8" runname="DB104.DBX187.7" start="93" len="1" method="Default_Bit(15,1)" max="" issave="True" subtractor="" remark="备用" />
</Data> </Data>
</Group> </Group>

Loading…
Cancel
Save