diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjPlanning/InItDbAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjPlanning/InItDbAction.cs index c52f686..d8e117c 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjPlanning/InItDbAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjPlanning/InItDbAction.cs @@ -1,15 +1,19 @@ using System; +using System.Collections.Generic; using System.Data; using System.Linq; using Mesnac.Action.Base; using Mesnac.Action.ChemicalWeighing.LjMaterial; +using Mesnac.Controls.Base; +using Mesnac.Controls.Default; namespace Mesnac.Action.ChemicalWeighing.LjPlanning { - public class InItDbAction:ChemicalWeighingAction, IAction + public class InItDbAction:ChemicalWeighingAction, IAction { private DbMCControl _materialGridControl = null; //物料列表控件 private RuntimeParameter _runtime; + private MCCombobox PlanStatus; public void Run(RuntimeParameter runtime) { base.RunIni(runtime); //必须调用 @@ -30,6 +34,15 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "lj_planning") .FirstOrDefault(); //获取物料数据控件 this._materialGridControl = materialGridControl; + List mcControllist = GetAllDbMCControlsByOption(DbOptionTypes.Query);//获取所有待初始化控件 + + PlanStatus = mcControllist.FirstOrDefault(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey == "PlanStatus").BaseControl as MCCombobox; + + + String sql = @"select statusid as CmbValue ,statusname as CmbDisplay from lj_planning_status"; + DataTable dataTable = DBHelp.GetTable(sql); + + PlanStatus.DataSource = dataTable; FileControl(); } @@ -37,7 +50,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning { DataTable table = DBHelp.GetTable(@"select Id,PlanName, PlanNo, Status, CreateTime, UpdateTime, BegTime, EndTime, NumCar, Unit, Remark, IsEnable, FormulaId, FormulaName,'' as StatusName - ,ClassName from lj_planning where IsEnable=1 order by CreateTime desc "); + ,ClassName from lj_planning where IsEnable=1 order by CreateTime desc "); if (this._materialGridControl != null && this._materialGridControl.BaseControl != null) { diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj index d3a675d..0e15462 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj @@ -169,9 +169,6 @@ False ..\..\..\PlugInPlatform\Mesnac.PlugIn.dll - - ..\..\Microsoft.Office.Interop.Excel.dll -