private void ExecuteTableAction(ICommandAdapter adapter, string action) { var executeTableActionCommand = new ExecuteTableActionCommand(); executeTableActionCommand.SetApplicationOptions(_applicationOptions); executeTableActionCommand.Parameters.MainParameter = Parameters.MainParameter; var parameters = Parameters.Where(parameter => parameter.Name != "Columns" && parameter.Name != "Values").Select(parameter => new Parameter(parameter.Name, parameter.Value, parameter.IsEqual, EndPosition)).First(); executeTableActionCommand.Parameters.Add(parameters); executeTableActionCommand.Parameters.Add(new Parameter(" " + action + " = ''", EndPosition)); executeTableActionCommand.Execute(adapter); }
protected override void InternalExecute(ICommandAdapter adapter) { var executeTableActionCommand = new ExecuteTableActionCommand(); executeTableActionCommand.SetApplicationOptions(_applicationOptions); var mainParameter = new MainParameter { Value = "" }; executeTableActionCommand.Parameters.MainParameter = mainParameter; executeTableActionCommand.Parameters.Add(new Parameter(" SelectAll = True", EndPosition)); executeTableActionCommand.Execute(adapter); var optionalActionCommand = new OptionalActionCommand(); optionalActionCommand.DoAction(adapter, "Delete", null); optionalActionCommand.DoAction(adapter, "Yes", null); }