using System; using System.Collections.Generic; using System.Linq; using System.Text; using Mesnac.Action.Base; namespace Mesnac.Action.Feeding.Qingquan.Technology { /// /// 把缓存的配方ID设置为当前配方-配方管理 /// public class SetRecipeObjIdFromCacheAction : FeedingAction, IAction { public void Run(RuntimeParameter runtime) { base.RunIni(runtime); DbMCSource dbsource = base.GetAllDbMCSources().FirstOrDefault(); DbMCControl objIDbControl = base.GetDbMCControlByKey("[" + dbsource.DesignSource + "].[pmt_recipe].[ObjID]").FirstOrDefault(); if (objIDbControl == null) { ICSharpCode.Core.LoggingService.Warn("把缓存的配方ID设置为当前配方失败:未在界面中找到与[pmt_recipe].[ObjID]绑定的控件!"); return; } string objID = base.GetSysValue("TempRecipeObjID"); if (!String.IsNullOrEmpty(objID)) { objIDbControl.BaseControl.MCValue = objID; } } } }