diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMetage/InitDbAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMetage/InitDbAction.cs index 1e1db9e..d9d2d9a 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMetage/InitDbAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMetage/InitDbAction.cs @@ -37,6 +37,24 @@ namespace Mesnac.Action.ChemicalWeighing.LjMetage DataTable table = DBHelp.GetTable(@"select Id, Name, HighSpeed, LowSpeed, WeightSlow, Precut, JogTime from MetageSetting"); + + foreach (DataRow row in table.Rows) + { + string name=row["name"].ToString(); + if(name == "大仓G") + { + row["name"] = "大仓J"; + } + else + { + if (name == "大仓J") + { + row["name"] = "大仓G"; + } + } + } + + if (this._materialGridControl != null && this._materialGridControl.BaseControl != null) { this._materialGridControl.BaseControl.BindDataSource = null; diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMetage/MetageHelp.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMetage/MetageHelp.cs index 1ccff77..084ed04 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMetage/MetageHelp.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMetage/MetageHelp.cs @@ -24,9 +24,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjMetage int jobTime = start + 16; PlcConnect.Instance.Write($"DB2107.{highSpeed}.0", view.HighSpeed); - - - PlcConnect.Instance.Write($"DB2107.{lowSpeed}.0", view.LowSpeed); PlcConnect.Instance.Write($"DB2107.{weightSlow}.0", view.WeightSlow); PlcConnect.Instance.Write($"DB2107.{precut}.0", view.Precut); diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/OliveEQSetting/InItDbAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/OliveEQSetting/InItDbAction.cs index c1bd882..69757ce 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/OliveEQSetting/InItDbAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/OliveEQSetting/InItDbAction.cs @@ -292,8 +292,24 @@ namespace Mesnac.Action.ChemicalWeighing.OliveEQSetting } DataTable table = - DBHelp.GetTable(@"select Id, Name, HighSpeed, LowSpeed, WeightSlow, Precut, JogTime from MetageSetting"); - + DBHelp.GetTable(@"select Id, Name, HighSpeed, LowSpeed, WeightSlow, Precut, JogTime from MetageSetting order by Soc"); + + foreach (DataRow row in table.Rows) + { + string name = row["name"].ToString(); + if (name == "大仓G") + { + row["name"] = "大仓J"; + } + else + { + if (name == "大仓J") + { + row["name"] = "大仓G"; + } + } + } + if (materialGridControl != null && materialGridControl.BaseControl != null) { materialGridControl.BaseControl.BindDataSource = null;