using System.Linq; using Mesnac.Action.Base; namespace Mesnac.Action.ChemicalWeighing.LjPressure { public class UpdateAction: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, "pressureSetting") .FirstOrDefault(); //获取物料数据控件 this._materialGridControl = materialGridControl; } } }