public override void Execute(DeleteCore core) { ChildBeforeOperations.ForEach (o => o.Execute (core)); core.ExcuteDlg.AddExcuteOperation(String.Format("Удаляем из таблицы {0}", TableName)); core.ExecuteSql( String.Format ("DELETE FROM {0} {1}", TableName, WhereStatment), ItemId); ChildAfterOperations.ForEach (o => o.Execute (core)); }
public override void Execute(DeleteCore core) { var sql = new DBWorks.SQLHelper ("UPDATE {0} SET ", TableName); sql.Add ("{0} = NULL ", CleanField); sql.Add (WhereStatment); core.ExcuteDlg.AddExcuteOperation(String.Format("Очищаем ссылки в таблице {0}", TableName)); core.ExecuteSql(sql.Text, ItemId); }