change - 计划配方新增查询功能

dep_nodyang
wangsr 1 year ago
parent 6eaee007f6
commit 37fcb77890

@ -65,12 +65,35 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning.Db
public static DataTable GetMainTable()
{
string sql = "select Id, FormulaNo, FormulaName, RecipeTypeId, RecipeTypeName, IsEnable, FormulaVersion, " +
string sql = "select Id, FormulaNo, FormulaName, RecipeTypeId, RecipeTypeName, IsEnable, FormulaVersion, " +
"CreateTime, UpdateTime, Unit from Lj_Formula where IsEnable=1 order by CreateTime desc";
return GetTable(sql);
}
public static DataTable GetMainTable(string recipeTypeId, string formulaName)
{
string sql = "select Id, FormulaNo, FormulaName, RecipeTypeId, RecipeTypeName, IsEnable, FormulaVersion, " +
"CreateTime, UpdateTime, Unit from Lj_Formula where IsEnable=1 ";
if(!string.IsNullOrEmpty(recipeTypeId) && recipeTypeId!="-1")
{
sql += " and RecipeTypeId=" + recipeTypeId;
}
if(!string.IsNullOrEmpty(formulaName) && formulaName.Length > 0)
{
sql += $" and FormulaName like '%{formulaName}%'";
}
sql += " order by CreateTime desc";
return GetTable(sql);
}
public static DataTable GetDetailTable(int formulaId)
{
string sql = "select Id, FormulaId, BinNo, MId, MName, Weight, Tolerance, Machine, MachineType,\r\n FormulaType, ActionCode, ActionName, TimeInfo, Temp, Speed, SetValue, SetTolerance,StockMaterialId,ActionId from Lj_Formula_Detail where FormulaId=" + formulaId;

@ -146,69 +146,66 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.txtName);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Location = new System.Drawing.Point(18, 18);
this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBox1.Location = new System.Drawing.Point(12, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBox1.Size = new System.Drawing.Size(945, 70);
this.groupBox1.Size = new System.Drawing.Size(630, 47);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "配方";
//
// txtCpVersion
//
this.txtCpVersion.Location = new System.Drawing.Point(732, 23);
this.txtCpVersion.Margin = new System.Windows.Forms.Padding(8, 7, 8, 7);
this.txtCpVersion.Location = new System.Drawing.Point(488, 15);
this.txtCpVersion.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.txtCpVersion.MaxLength = 100;
this.txtCpVersion.Name = "txtCpVersion";
this.txtCpVersion.Size = new System.Drawing.Size(192, 28);
this.txtCpVersion.Size = new System.Drawing.Size(129, 21);
this.txtCpVersion.TabIndex = 60;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(629, 29);
this.label1.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0);
this.label1.Location = new System.Drawing.Point(419, 19);
this.label1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(89, 18);
this.label1.Size = new System.Drawing.Size(59, 12);
this.label1.TabIndex = 59;
this.label1.Text = "配方版本:";
//
// DrpCpType
//
this.DrpCpType.FormattingEnabled = true;
this.DrpCpType.Location = new System.Drawing.Point(423, 24);
this.DrpCpType.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.DrpCpType.Location = new System.Drawing.Point(282, 16);
this.DrpCpType.Name = "DrpCpType";
this.DrpCpType.Size = new System.Drawing.Size(192, 26);
this.DrpCpType.Size = new System.Drawing.Size(129, 20);
this.DrpCpType.TabIndex = 58;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(323, 29);
this.label4.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0);
this.label4.Location = new System.Drawing.Point(215, 19);
this.label4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(89, 18);
this.label4.Size = new System.Drawing.Size(59, 12);
this.label4.TabIndex = 57;
this.label4.Text = "配方类别:";
//
// txtName
//
this.txtName.Location = new System.Drawing.Point(114, 23);
this.txtName.Margin = new System.Windows.Forms.Padding(8, 7, 8, 7);
this.txtName.Location = new System.Drawing.Point(76, 15);
this.txtName.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.txtName.MaxLength = 100;
this.txtName.Name = "txtName";
this.txtName.Size = new System.Drawing.Size(192, 28);
this.txtName.Size = new System.Drawing.Size(129, 21);
this.txtName.TabIndex = 56;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(18, 29);
this.label3.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0);
this.label3.Location = new System.Drawing.Point(12, 19);
this.label3.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(89, 18);
this.label3.Size = new System.Drawing.Size(59, 12);
this.label3.TabIndex = 53;
this.label3.Text = "配方名称:";
//
@ -216,11 +213,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
//
this.groupBox2.Controls.Add(this.tabControl2);
this.groupBox2.Controls.Add(this.groupBox3);
this.groupBox2.Location = new System.Drawing.Point(18, 114);
this.groupBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBox2.Location = new System.Drawing.Point(12, 76);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBox2.Size = new System.Drawing.Size(667, 955);
this.groupBox2.Size = new System.Drawing.Size(445, 637);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "称量配方";
@ -229,11 +224,10 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
//
this.tabControl2.Controls.Add(this.tabPage3);
this.tabControl2.Controls.Add(this.tabPage4);
this.tabControl2.Location = new System.Drawing.Point(9, 318);
this.tabControl2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabControl2.Location = new System.Drawing.Point(6, 212);
this.tabControl2.Name = "tabControl2";
this.tabControl2.SelectedIndex = 0;
this.tabControl2.Size = new System.Drawing.Size(649, 629);
this.tabControl2.Size = new System.Drawing.Size(433, 419);
this.tabControl2.TabIndex = 1;
//
// tabPage3
@ -241,11 +235,10 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
this.tabPage3.Controls.Add(this.groupBox6);
this.tabPage3.Controls.Add(this.CbSiloC);
this.tabPage3.Controls.Add(this.dataGridSilo1);
this.tabPage3.Location = new System.Drawing.Point(4, 28);
this.tabPage3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage3.Size = new System.Drawing.Size(641, 597);
this.tabPage3.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
this.tabPage3.Size = new System.Drawing.Size(425, 393);
this.tabPage3.TabIndex = 0;
this.tabPage3.Text = "糊化机(#A)";
this.tabPage3.UseVisualStyleBackColor = true;
@ -253,11 +246,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
// groupBox6
//
this.groupBox6.Controls.Add(this.dataGridWater1);
this.groupBox6.Location = new System.Drawing.Point(9, 337);
this.groupBox6.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBox6.Location = new System.Drawing.Point(6, 225);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBox6.Size = new System.Drawing.Size(620, 242);
this.groupBox6.Size = new System.Drawing.Size(413, 161);
this.groupBox6.TabIndex = 71;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "水称";
@ -269,12 +260,11 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
this.ComBoxSilo1BinWater,
this.TxtSilo1WeightWater,
this.TxtSilo1ToleranceWater});
this.dataGridWater1.Location = new System.Drawing.Point(9, 30);
this.dataGridWater1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.dataGridWater1.Location = new System.Drawing.Point(6, 20);
this.dataGridWater1.Name = "dataGridWater1";
this.dataGridWater1.RowHeadersWidth = 62;
this.dataGridWater1.RowTemplate.Height = 23;
this.dataGridWater1.Size = new System.Drawing.Size(602, 204);
this.dataGridWater1.Size = new System.Drawing.Size(401, 136);
this.dataGridWater1.TabIndex = 69;
this.dataGridWater1.DefaultValuesNeeded += new System.Windows.Forms.DataGridViewRowEventHandler(this.dataGridWater1_DefaultValuesNeeded);
//
@ -305,10 +295,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
// CbSiloC
//
this.CbSiloC.AutoSize = true;
this.CbSiloC.Location = new System.Drawing.Point(8, 10);
this.CbSiloC.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.CbSiloC.Location = new System.Drawing.Point(5, 7);
this.CbSiloC.Name = "CbSiloC";
this.CbSiloC.Size = new System.Drawing.Size(250, 22);
this.CbSiloC.Size = new System.Drawing.Size(168, 16);
this.CbSiloC.TabIndex = 70;
this.CbSiloC.Text = "糊化机B采用糊化机A的配方";
this.CbSiloC.UseVisualStyleBackColor = true;
@ -321,12 +310,11 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
this.ComBoxSilo1Bin,
this.TxtSilo1Weight,
this.TxtSilo1Tolerance});
this.dataGridSilo1.Location = new System.Drawing.Point(8, 42);
this.dataGridSilo1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.dataGridSilo1.Location = new System.Drawing.Point(5, 28);
this.dataGridSilo1.Name = "dataGridSilo1";
this.dataGridSilo1.RowHeadersWidth = 62;
this.dataGridSilo1.RowTemplate.Height = 23;
this.dataGridSilo1.Size = new System.Drawing.Size(621, 287);
this.dataGridSilo1.Size = new System.Drawing.Size(414, 191);
this.dataGridSilo1.TabIndex = 63;
this.dataGridSilo1.DefaultValuesNeeded += new System.Windows.Forms.DataGridViewRowEventHandler(this.dataGridSilo_DefaultValuesNeeded);
//
@ -358,11 +346,10 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
//
this.tabPage4.Controls.Add(this.groupBox4);
this.tabPage4.Controls.Add(this.dataGridSilo2);
this.tabPage4.Location = new System.Drawing.Point(4, 28);
this.tabPage4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage4.Location = new System.Drawing.Point(4, 22);
this.tabPage4.Name = "tabPage4";
this.tabPage4.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage4.Size = new System.Drawing.Size(641, 597);
this.tabPage4.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
this.tabPage4.Size = new System.Drawing.Size(425, 393);
this.tabPage4.TabIndex = 1;
this.tabPage4.Text = "糊化机(#B)";
this.tabPage4.UseVisualStyleBackColor = true;
@ -370,11 +357,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
// groupBox4
//
this.groupBox4.Controls.Add(this.dataGridWater2);
this.groupBox4.Location = new System.Drawing.Point(10, 325);
this.groupBox4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBox4.Location = new System.Drawing.Point(7, 217);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBox4.Size = new System.Drawing.Size(620, 198);
this.groupBox4.Size = new System.Drawing.Size(413, 132);
this.groupBox4.TabIndex = 73;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "水称";
@ -386,12 +371,11 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
this.ComBoxSilo2BinWater,
this.TxtSilo2WeightWater,
this.TxtSilo2ToleranceWater});
this.dataGridWater2.Location = new System.Drawing.Point(9, 30);
this.dataGridWater2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.dataGridWater2.Location = new System.Drawing.Point(6, 20);
this.dataGridWater2.Name = "dataGridWater2";
this.dataGridWater2.RowHeadersWidth = 62;
this.dataGridWater2.RowTemplate.Height = 23;
this.dataGridWater2.Size = new System.Drawing.Size(600, 146);
this.dataGridWater2.Size = new System.Drawing.Size(400, 97);
this.dataGridWater2.TabIndex = 69;
this.dataGridWater2.DefaultValuesNeeded += new System.Windows.Forms.DataGridViewRowEventHandler(this.dataGridWater2_DefaultValuesNeeded);
//
@ -426,12 +410,11 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
this.ComBoxSilo2Bin,
this.TxtSilo2Weight,
this.TxtSilo2Tolerance});
this.dataGridSilo2.Location = new System.Drawing.Point(4, 12);
this.dataGridSilo2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.dataGridSilo2.Location = new System.Drawing.Point(3, 8);
this.dataGridSilo2.Name = "dataGridSilo2";
this.dataGridSilo2.RowHeadersWidth = 62;
this.dataGridSilo2.RowTemplate.Height = 23;
this.dataGridSilo2.Size = new System.Drawing.Size(630, 305);
this.dataGridSilo2.Size = new System.Drawing.Size(420, 203);
this.dataGridSilo2.TabIndex = 72;
this.dataGridSilo2.DefaultValuesNeeded += new System.Windows.Forms.DataGridViewRowEventHandler(this.dataGridSilo2_DefaultValuesNeeded);
//
@ -463,11 +446,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
// groupBox3
//
this.groupBox3.Controls.Add(this.dataGridDryer);
this.groupBox3.Location = new System.Drawing.Point(9, 30);
this.groupBox3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBox3.Location = new System.Drawing.Point(6, 20);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBox3.Size = new System.Drawing.Size(649, 278);
this.groupBox3.Size = new System.Drawing.Size(433, 185);
this.groupBox3.TabIndex = 0;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "干混机(#A)";
@ -480,12 +461,11 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
this.TxtDryer1Weight,
this.TxtDryer1Tolerance});
this.dataGridDryer.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridDryer.Location = new System.Drawing.Point(4, 26);
this.dataGridDryer.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.dataGridDryer.Location = new System.Drawing.Point(3, 17);
this.dataGridDryer.Name = "dataGridDryer";
this.dataGridDryer.RowHeadersWidth = 62;
this.dataGridDryer.RowTemplate.Height = 23;
this.dataGridDryer.Size = new System.Drawing.Size(641, 247);
this.dataGridDryer.Size = new System.Drawing.Size(427, 165);
this.dataGridDryer.TabIndex = 63;
this.dataGridDryer.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridDryer_CellContentClick);
this.dataGridDryer.DataBindingComplete += new System.Windows.Forms.DataGridViewBindingCompleteEventHandler(this.dataGridView1_DataBindingComplete);
@ -526,10 +506,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
//
// BtnSave
//
this.BtnSave.Location = new System.Drawing.Point(132, 1079);
this.BtnSave.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.BtnSave.Location = new System.Drawing.Point(88, 719);
this.BtnSave.Name = "BtnSave";
this.BtnSave.Size = new System.Drawing.Size(179, 71);
this.BtnSave.Size = new System.Drawing.Size(119, 47);
this.BtnSave.TabIndex = 2;
this.BtnSave.Text = "保存配方";
this.BtnSave.UseVisualStyleBackColor = true;
@ -540,11 +519,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
this.groupBox5.Controls.Add(this.tabControl3);
this.groupBox5.Controls.Add(this.tabControl1);
this.groupBox5.Controls.Add(this.groupBox7);
this.groupBox5.Location = new System.Drawing.Point(694, 114);
this.groupBox5.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBox5.Location = new System.Drawing.Point(463, 76);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBox5.Size = new System.Drawing.Size(1081, 1038);
this.groupBox5.Size = new System.Drawing.Size(721, 692);
this.groupBox5.TabIndex = 3;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "混合配方";
@ -553,11 +530,10 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
//
this.tabControl3.Controls.Add(this.tabPage5);
this.tabControl3.Controls.Add(this.tabPage6);
this.tabControl3.Location = new System.Drawing.Point(9, 646);
this.tabControl3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabControl3.Location = new System.Drawing.Point(6, 431);
this.tabControl3.Name = "tabControl3";
this.tabControl3.SelectedIndex = 0;
this.tabControl3.Size = new System.Drawing.Size(1063, 384);
this.tabControl3.Size = new System.Drawing.Size(709, 256);
this.tabControl3.TabIndex = 5;
//
// tabPage5
@ -565,11 +541,10 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
this.tabPage5.Controls.Add(this.CbWeterH);
this.tabPage5.Controls.Add(this.label6);
this.tabPage5.Controls.Add(this.dataGridWeter1);
this.tabPage5.Location = new System.Drawing.Point(4, 28);
this.tabPage5.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage5.Location = new System.Drawing.Point(4, 22);
this.tabPage5.Name = "tabPage5";
this.tabPage5.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage5.Size = new System.Drawing.Size(1055, 352);
this.tabPage5.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
this.tabPage5.Size = new System.Drawing.Size(701, 230);
this.tabPage5.TabIndex = 0;
this.tabPage5.Text = "湿混机(#A)";
this.tabPage5.UseVisualStyleBackColor = true;
@ -577,10 +552,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
// CbWeterH
//
this.CbWeterH.AutoSize = true;
this.CbWeterH.Location = new System.Drawing.Point(8, 10);
this.CbWeterH.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.CbWeterH.Location = new System.Drawing.Point(5, 7);
this.CbWeterH.Name = "CbWeterH";
this.CbWeterH.Size = new System.Drawing.Size(205, 22);
this.CbWeterH.Size = new System.Drawing.Size(138, 16);
this.CbWeterH.TabIndex = 70;
this.CbWeterH.Text = "复制湿混机A混合配方";
this.CbWeterH.UseVisualStyleBackColor = true;
@ -589,10 +563,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(221, 11);
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label6.Location = new System.Drawing.Point(147, 7);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(287, 18);
this.label6.Size = new System.Drawing.Size(191, 12);
this.label6.TabIndex = 69;
this.label6.Text = "如果湿混机B采用相同的配方请勾选";
//
@ -606,12 +579,11 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
this.ComBoxWeter1Speed,
this.ComBoxWeter1SetValue,
this.ComBoxWeter1SetTolerance});
this.dataGridWeter1.Location = new System.Drawing.Point(9, 42);
this.dataGridWeter1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.dataGridWeter1.Location = new System.Drawing.Point(6, 28);
this.dataGridWeter1.Name = "dataGridWeter1";
this.dataGridWeter1.RowHeadersWidth = 62;
this.dataGridWeter1.RowTemplate.Height = 23;
this.dataGridWeter1.Size = new System.Drawing.Size(1034, 294);
this.dataGridWeter1.Size = new System.Drawing.Size(689, 196);
this.dataGridWeter1.TabIndex = 64;
this.dataGridWeter1.DefaultValuesNeeded += new System.Windows.Forms.DataGridViewRowEventHandler(this.dataGridWeter1_DefaultValuesNeeded_1);
//
@ -666,11 +638,10 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
// tabPage6
//
this.tabPage6.Controls.Add(this.dataGridWeter2);
this.tabPage6.Location = new System.Drawing.Point(4, 28);
this.tabPage6.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage6.Location = new System.Drawing.Point(4, 22);
this.tabPage6.Name = "tabPage6";
this.tabPage6.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage6.Size = new System.Drawing.Size(1055, 352);
this.tabPage6.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
this.tabPage6.Size = new System.Drawing.Size(701, 230);
this.tabPage6.TabIndex = 1;
this.tabPage6.Text = "湿混机(#B)";
this.tabPage6.UseVisualStyleBackColor = true;
@ -686,12 +657,11 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
this.ComBoxWeter2SetValue,
this.ComBoxWeter2SetTolerance});
this.dataGridWeter2.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridWeter2.Location = new System.Drawing.Point(4, 5);
this.dataGridWeter2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.dataGridWeter2.Location = new System.Drawing.Point(3, 3);
this.dataGridWeter2.Name = "dataGridWeter2";
this.dataGridWeter2.RowHeadersWidth = 62;
this.dataGridWeter2.RowTemplate.Height = 23;
this.dataGridWeter2.Size = new System.Drawing.Size(1047, 342);
this.dataGridWeter2.Size = new System.Drawing.Size(695, 224);
this.dataGridWeter2.TabIndex = 65;
this.dataGridWeter2.DefaultValuesNeeded += new System.Windows.Forms.DataGridViewRowEventHandler(this.dataGridWeter2_DefaultValuesNeeded);
//
@ -747,21 +717,19 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Location = new System.Drawing.Point(9, 348);
this.tabControl1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabControl1.Location = new System.Drawing.Point(6, 232);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(1063, 295);
this.tabControl1.Size = new System.Drawing.Size(709, 197);
this.tabControl1.TabIndex = 4;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.dataGridSiloH1);
this.tabPage1.Location = new System.Drawing.Point(4, 28);
this.tabPage1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage1.Size = new System.Drawing.Size(1055, 263);
this.tabPage1.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
this.tabPage1.Size = new System.Drawing.Size(701, 171);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "糊化机(#A)";
this.tabPage1.UseVisualStyleBackColor = true;
@ -774,12 +742,11 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
this.ComBoxSilo1TimeInfo,
this.ComBoxSilo1Temp,
this.ComBoxSilo1Speed});
this.dataGridSiloH1.Location = new System.Drawing.Point(9, 14);
this.dataGridSiloH1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.dataGridSiloH1.Location = new System.Drawing.Point(6, 9);
this.dataGridSiloH1.Name = "dataGridSiloH1";
this.dataGridSiloH1.RowHeadersWidth = 62;
this.dataGridSiloH1.RowTemplate.Height = 23;
this.dataGridSiloH1.Size = new System.Drawing.Size(1034, 233);
this.dataGridSiloH1.Size = new System.Drawing.Size(689, 155);
this.dataGridSiloH1.TabIndex = 66;
this.dataGridSiloH1.DefaultValuesNeeded += new System.Windows.Forms.DataGridViewRowEventHandler(this.dataGridSiloH1_DefaultValuesNeeded);
//
@ -818,11 +785,10 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
// tabPage2
//
this.tabPage2.Controls.Add(this.dataGridSiloH2);
this.tabPage2.Location = new System.Drawing.Point(4, 28);
this.tabPage2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage2.Size = new System.Drawing.Size(1055, 263);
this.tabPage2.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
this.tabPage2.Size = new System.Drawing.Size(701, 171);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "糊化机(#B)";
this.tabPage2.UseVisualStyleBackColor = true;
@ -836,12 +802,11 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
this.ComBoxSilo2Temp,
this.ComBoxSilo2Speed});
this.dataGridSiloH2.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridSiloH2.Location = new System.Drawing.Point(4, 5);
this.dataGridSiloH2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.dataGridSiloH2.Location = new System.Drawing.Point(3, 3);
this.dataGridSiloH2.Name = "dataGridSiloH2";
this.dataGridSiloH2.RowHeadersWidth = 62;
this.dataGridSiloH2.RowTemplate.Height = 23;
this.dataGridSiloH2.Size = new System.Drawing.Size(1047, 253);
this.dataGridSiloH2.Size = new System.Drawing.Size(695, 165);
this.dataGridSiloH2.TabIndex = 64;
this.dataGridSiloH2.DefaultValuesNeeded += new System.Windows.Forms.DataGridViewRowEventHandler(this.dataGridSiloH2_DefaultValuesNeeded);
//
@ -880,11 +845,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
// groupBox7
//
this.groupBox7.Controls.Add(this.dataGridDryer1Action);
this.groupBox7.Location = new System.Drawing.Point(9, 30);
this.groupBox7.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBox7.Location = new System.Drawing.Point(6, 20);
this.groupBox7.Name = "groupBox7";
this.groupBox7.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.groupBox7.Size = new System.Drawing.Size(1063, 312);
this.groupBox7.Size = new System.Drawing.Size(709, 208);
this.groupBox7.TabIndex = 0;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "干混机(#A)";
@ -897,12 +860,11 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
this.ComBoxDryer1TimeInfo,
this.ComBoxDryer1Temp,
this.ComBoxDryer1Speed});
this.dataGridDryer1Action.Location = new System.Drawing.Point(4, 25);
this.dataGridDryer1Action.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.dataGridDryer1Action.Location = new System.Drawing.Point(3, 17);
this.dataGridDryer1Action.Name = "dataGridDryer1Action";
this.dataGridDryer1Action.RowHeadersWidth = 62;
this.dataGridDryer1Action.RowTemplate.Height = 23;
this.dataGridDryer1Action.Size = new System.Drawing.Size(1053, 283);
this.dataGridDryer1Action.Size = new System.Drawing.Size(702, 189);
this.dataGridDryer1Action.TabIndex = 63;
this.dataGridDryer1Action.DefaultValuesNeeded += new System.Windows.Forms.DataGridViewRowEventHandler(this.dataGridDryer1Action_DefaultValuesNeeded);
//
@ -942,10 +904,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
//
// BtnCanel
//
this.BtnCanel.Location = new System.Drawing.Point(387, 1079);
this.BtnCanel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.BtnCanel.Location = new System.Drawing.Point(258, 719);
this.BtnCanel.Name = "BtnCanel";
this.BtnCanel.Size = new System.Drawing.Size(179, 71);
this.BtnCanel.Size = new System.Drawing.Size(119, 47);
this.BtnCanel.TabIndex = 2;
this.BtnCanel.Text = "取消配方";
this.BtnCanel.UseVisualStyleBackColor = true;
@ -953,18 +914,16 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
//
// FrmWeiRecipeDataAdd
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1799, 1168);
this.ClientSize = new System.Drawing.Size(1199, 707);
this.Controls.Add(this.groupBox5);
this.Controls.Add(this.BtnCanel);
this.Controls.Add(this.BtnSave);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Name = "FrmWeiRecipeDataAdd";
this.Text = "配方名称";
this.Load += new System.EventHandler(this.FrmWeiRecipeDataAdd_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);

@ -1103,7 +1103,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
}
private void dataGridDryer_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
{
}
@ -1151,10 +1151,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
}
}
private void FrmWeiRecipeDataAdd_Load(object sender, EventArgs e)
{
}
}
}

@ -0,0 +1,77 @@
using Mesnac.Action.Base;
using Mesnac.Controls.Base;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Mesnac.Action.Base;
using Mesnac.Codd.Session;
using Mesnac.Controls.Base;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesnac.Action.ChemicalWeighing.LjPlanning
{
public class SelectAction : ChemicalWeighingAction, IAction
{
private DbMCControl _materialGridControl = null; //物料列表控件
private RuntimeParameter _runtime;
public void Run(RuntimeParameter runtime)
{
base.RunIni(runtime); //必须调用
this._runtime = runtime;
DbMCControl _materialGridControl = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "lj_planning").FirstOrDefault();
DbHelper dbHelper = Mesnac.Basic.DataSourceFactory.Instance.GetDbHelper(Mesnac.Basic.DataSourceFactory.MCDbType.Local);
dbHelper.ClearParameter();
StringBuilder sbSql = new StringBuilder(@" select Id, PlanName, PlanNo, Status, CreateTime, UpdateTime, BegTime, EndTime, NumCar, Unit, Remark, IsEnable, FormulaId, FormulaName,'' as StatusName
,ClassName from lj_planning where IsEnable=1");
List<DbMCControl> mcControllist = GetAllDbMCControlsByOption(DbOptionTypes.Query);//获取所有待初始化控件
IBaseControl startdate = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "startdate").FirstOrDefault().BaseControl;
if (startdate != null)
{
//Append
sbSql.AppendLine(@" and CreateTime >='" + Convert.ToDateTime(startdate.MCValue).ToString("yyyy-MM-dd") + " 00:00:00.000' ");
}
else
{
ICSharpCode.Core.LoggingService<SelectAction>.Debug("{榄菊计划报表查询} 缺少key值为startdate的时间查询条件...");
return;
}
IBaseControl enddate = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "enddate").FirstOrDefault().BaseControl;
if (enddate != null)
{
sbSql.AppendLine(@"AND CreateTime <='" + Convert.ToDateTime(enddate.MCValue).ToString("yyyy-MM-dd") + " 23:59:59.999' ");
}
else
{
ICSharpCode.Core.LoggingService<SelectAction>.Debug("{榄菊计划报表查询} 缺少key值为enddate的时间查询条件...");
return;
}
sbSql.Append(" ORDER BY CreateTime desc");
dbHelper.CommandText = sbSql.ToString();
dbHelper.CommandType = System.Data.CommandType.Text;
DataTable table = dbHelper.ToDataTable();
_materialGridControl.BaseControl.BindDataSource = table;
}
}
}

@ -1,8 +1,12 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using Mesnac.Action.Base;
using Mesnac.Action.ChemicalWeighing.LjMaterial;
using Mesnac.Action.ChemicalWeighing.LjPlanning.Db;
using Mesnac.Controls.Base;
using Mesnac.Controls.Default;
namespace Mesnac.Action.ChemicalWeighing.LjRecipeData
{
@ -11,6 +15,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjRecipeData
private DbMCControl _materialGridControl = null; //物料列表控件
private RuntimeParameter _runtime;
private MCCombobox LjFormulaKinds = null;
private MCTextBox LjFormulaName = null;
public void Run(RuntimeParameter runtime)
{
base.RunIni(runtime); //必须调用
@ -25,10 +32,24 @@ namespace Mesnac.Action.ChemicalWeighing.LjRecipeData
DelAction.OnDel -= Process_Event;
DelAction.OnDel += Process_Event;
DbMCControl materialGridControl = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local,
"Lj_Formula").FirstOrDefault(); //获取物料数据控件
//SelectSingleAction.OnSelectSingle -= Process_Event;
//SelectSingleAction.OnSelectSingle += Process_Event;
DbMCControl materialGridControl = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "Lj_Formula").FirstOrDefault(); //获取物料数据控件
List<DbMCControl> mcControllist = GetAllDbMCControlsByOption(DbOptionTypes.Query);//获取所有待初始化控件
LjFormulaKinds = mcControllist.FirstOrDefault(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey == "LjFormulaKinds").BaseControl as MCCombobox; //选择查询类型
LjFormulaName = mcControllist.FirstOrDefault(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey == "LjFormulaName").BaseControl as MCTextBox; //选择查询名称
this._materialGridControl = materialGridControl;
FileControl();
MCComboBoxData();
}
private void FileControl()
@ -45,6 +66,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjRecipeData
{
ICSharpCode.Core.LoggingService<InitDb>.Warn("配方信息配方数据控件为Null...");
}
}
#region 事件处理方法
@ -62,5 +85,24 @@ namespace Mesnac.Action.ChemicalWeighing.LjRecipeData
}
#endregion
private void MCComboBoxData()
{
string sql = "select recipetype_Id as CmbValue ,recipetype_Name as CmbDisplay from Base_RecipeType";
var dataTable = DBHelp.GetTable(sql);
var dr = dataTable.NewRow();
dr[0] = "-1";
dr[1] = "全部";
dataTable.Rows.InsertAt(dr, 0);
LjFormulaKinds.DataSource = dataTable;
}
}
}

@ -0,0 +1,66 @@
using Mesnac.Action.Base;
using Mesnac.Action.ChemicalWeighing.LjMaterial;
using Mesnac.Action.ChemicalWeighing.LjPlanning.Db;
using Mesnac.Controls.Base;
using Mesnac.Controls.Default;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mesnac.Action.ChemicalWeighing.LjRecipeData
{
public class SelectSingleAction : ChemicalWeighingAction, IAction
{
private DbMCControl MaterialGridControl = null; //物料列表控件
private RuntimeParameter Runtime;
private MCCombobox LjFormulaKinds = null;
private MCTextBox LjFormulaName = null;
//public static event EventHandler OnSelectSingle;
public void Run(RuntimeParameter runtime)
{
base.RunIni(runtime); //必须调用
this.Runtime = runtime;
MaterialGridControl = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "Lj_Formula").FirstOrDefault(); //获取物料数据控件
List<DbMCControl> mcControllist = GetAllDbMCControlsByOption(DbOptionTypes.Query);//获取所有待初始化控件
LjFormulaKinds = mcControllist.FirstOrDefault(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey == "LjFormulaKinds").BaseControl as MCCombobox; //选择查询类型
string value = LjFormulaKinds.MCValue.ToString();
LjFormulaName = mcControllist.FirstOrDefault(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey == "LjFormulaName").BaseControl as MCTextBox; //选择查询名称
string name=LjFormulaName.MCValue.ToString();
DataTable table = LjFormulaDb.GetMainTable(value,name);
if (this.MaterialGridControl != null && this.MaterialGridControl.BaseControl != null)
{
this.MaterialGridControl.BaseControl.BindDataSource = null;
this.MaterialGridControl.BaseControl.BindDataSource = table;
}
}
private void FileControl()
{
//if ()
}
}
}

@ -440,6 +440,7 @@
<Compile Include="LjMixManager\RecipePlcView.cs" />
<Compile Include="LjMixManager\UpdateAction.cs" />
<Compile Include="LjPlanning\AddAction.cs" />
<Compile Include="LjPlanning\SelectAction.cs" />
<Compile Include="LjPlanning\Db\LjFormulaDb.cs" />
<Compile Include="LjPlanning\DelAction.cs" />
<Compile Include="LjPlanning\DownloadAction.cs" />
@ -505,6 +506,7 @@
<Compile Include="LjProportional\UpAction.cs" />
<Compile Include="LjProportional\UpdateAction.cs" />
<Compile Include="LjRecipeData\AddAction.cs" />
<Compile Include="LjRecipeData\SelectSingleAction.cs" />
<Compile Include="LjRecipeData\DelAction.cs" />
<Compile Include="LjRecipeData\InitDb.cs" />
<Compile Include="LjRecipeData\SelectAction.cs" />

@ -31,7 +31,10 @@
<Remark>暂停计划管理</Remark>
</Action>
<Action action="10FD0031BDA5B8BC169D9110058782C5">
<Caption>查询计划管理</Caption>
<Remark>查询计划管理</Remark>
</Action>
</Path>
</Design>
@ -64,7 +67,10 @@
<Design action="465E50FDD19DD0AC66F28E4489F5F1DA">
<Runtime action="77A5B59C593DBB7C3595D08ACF11B37C"/>
</Design>
<Design action="10FD0031BDA5B8BC169D9110058782C5">
<Runtime action="5156CF089B112F6D176C35E958B9FEA4"/>
</Design>
</DesignToRuntime>
<Runtime>
@ -73,11 +79,11 @@
<Action action="B0DE07D1F99D43572C749B5D09B05B03" class="Mesnac.Action.ChemicalWeighing.LjPlanning.UpdateAction"/>
<Action action="58532262536F39BE86D0737E55C36FEF" class="Mesnac.Action.ChemicalWeighing.LjPlanning.AddAction"/>
<Action action="37268673EC12B2C11AE178FF7E965F6B" class="Mesnac.Action.ChemicalWeighing.LjPlanning.DelAction"/>
<Action action="B66445AADCB561B9AE43E8E7ED1AB55C" class="Mesnac.Action.ChemicalWeighing.LjPlanning.DownloadAction"/>
<Action action="77A5B59C593DBB7C3595D08ACF11B37C" class="Mesnac.Action.ChemicalWeighing.LjPlanning.PauseAction"/>
</Import>
<Action action="77A5B59C593DBB7C3595D08ACF11B37C" class="Mesnac.Action.ChemicalWeighing.LjPlanning.PauseAction"/>
<Action action="5156CF089B112F6D176C35E958B9FEA4" class="Mesnac.Action.ChemicalWeighing.LjPlanning.SelectAction"/>
</Import>
</Runtime>
</ActionService>

@ -26,6 +26,11 @@
<Caption>榄菊配方管理删除</Caption>
<Remark>榄菊配方管理删除</Remark>
</Action>
<Action action="9B8D2A6AF3884754EB174CA2D01BD717">
<Caption>榄菊配方管理查询</Caption>
<Remark>榄菊配方管理查询</Remark>
</Action>
</Path>
</Design>
@ -50,6 +55,10 @@
<Design action="15ECA82A3CFBEF18770AD69BE98BAAF7">
<Runtime action="FD4BF51FAF4A8AE1C23829C390A7B12E"/>
</Design>
<Design action="9B8D2A6AF3884754EB174CA2D01BD717">
<Runtime action="35A76B51C9FF90ADA3625D5D8D127E80"/>
</Design>
</DesignToRuntime>
@ -60,7 +69,8 @@
<Action action="4B0A717D3BD065DA8E93499D2EB32F9E" class="Mesnac.Action.ChemicalWeighing.LjRecipeData.SelectAction"/>
<Action action="EB8837497F01AA619519A02CD4147735" class="Mesnac.Action.ChemicalWeighing.LjRecipeData.AddAction"/>
<Action action="EB411F6E2058F4DD5EA7460F66C2E2F2" class="Mesnac.Action.ChemicalWeighing.LjRecipeData.UpdateAction"/>
<Action action="FD4BF51FAF4A8AE1C23829C390A7B12E" class="Mesnac.Action.ChemicalWeighing.LjRecipeData.DelAction"/>
<Action action="FD4BF51FAF4A8AE1C23829C390A7B12E" class="Mesnac.Action.ChemicalWeighing.LjRecipeData.DelAction"/>
<Action action="35A76B51C9FF90ADA3625D5D8D127E80" class="Mesnac.Action.ChemicalWeighing.LjRecipeData.SelectSingleAction"/>
</Import>
</Runtime>
</ActionService>
Loading…
Cancel
Save