From 65848c217544f2f4a88da9002621c56f2d5e4e8c Mon Sep 17 00:00:00 2001 From: wangsr Date: Sun, 24 Sep 2023 18:44:52 +0800 Subject: [PATCH] =?UTF-8?q?add=20-=20=E6=B7=BB=E5=8A=A0=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=B8=8B=E6=8B=89=E6=A1=86=20=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LjPlanning/InItDbAction.cs | 17 +++++++++++++++-- .../Mesnac.Action.ChemicalWeighing.csproj | 3 --- 2 files changed, 15 insertions(+), 5 deletions(-) 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 -