diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/DB/StockMaterrialDBHelp.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/DB/StockMaterrialDBHelp.cs index a5b6f0c..83f3448 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/DB/StockMaterrialDBHelp.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/DB/StockMaterrialDBHelp.cs @@ -15,23 +15,51 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl.DB /// 获取干混机物料 /// /// - public static List GetDryerMaterrial() + public static DataTable GetDryerMaterrial() { var list = GetStockMaterrial(1); list.RemoveAll(x => x.CmbValue == 5); list.RemoveAll(x => x.CmbValue == 6); - return list; + var dt = GetMcBox(); + foreach (var entity in list) + { + var dr = dt.NewRow(); + dr[0] = entity.CmbValue.ToString(); + dr[1] = entity.CmbDisplay; + dt.Rows.Add(dr); + + } + + return dt; + } + + private static DataTable GetMcBox() + { + DataTable dataTable = new DataTable(); + dataTable.Columns.Add("CmbValue", typeof(string)); + dataTable.Columns.Add("CmbDisplay", typeof(string)); + return dataTable; } /// /// 获取糊化机物料 /// /// - public static List GetSiloMaterrial() + public static DataTable GetSiloMaterrial() { var list1 = GetStockMaterrial(1); list1 = list1.Where(x => x.CmbValue == 5 || x.CmbValue == 6).ToList(); - return list1; + var dt = GetMcBox(); + foreach (var entity in list1) + { + var dr = dt.NewRow(); + dr[0] = entity.CmbValue.ToString(); + dr[1] = entity.CmbDisplay; + dt.Rows.Add(dr); + + } + + return dt; } /// diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj index 7560737..28ceacd 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj @@ -176,6 +176,9 @@ False ..\..\..\PlugInPlatform\Mesnac.PlugIn.dll + + ..\..\Microsoft.Office.Interop.Excel.dll +