using Mesnac.Action.Base; using Mesnac.Controls.Base; namespace Mesnac.Action.Default.SynchroData { public class ClearForm : DatabaseAction, IAction { public void Run(RuntimeParameter runtime) { base.RunIni(runtime); //必须调用 foreach (DbMCControl control in GetAllDbMCControls()) { if ((!string.IsNullOrWhiteSpace(control.DesignSource)) && (!string.IsNullOrWhiteSpace(control.DataTable)) && (!string.IsNullOrWhiteSpace(control.DataField)) && control.BaseControl.DbOptionType == DbOptionTypes.Modify && (control.BaseControl != runtime.Sender)) { control.BaseControl.MCValue = null; } } } } }