private void DoRemove(DbObjects item) { int x = Console.CursorLeft; int y = Console.CursorTop; if (!item.Checked) { foreach (var depend in item.Dependencies) { DoRemove(depend); } Console.SetCursorPosition(x, y); _log.Message($" - {item.Name.Insert(item.Name.Length, C_EMPTY_TABLE_NAME)}"); try { item.ExecOrder = _log.GetExecOrder(); item.SQL = GetDeleteSQL(item); item.RevertSQL = GetRollbackSQL(item); _connection.Execute(item.SQL); item.Checked = true; Console.SetCursorPosition(x, y); } catch (Exception e) { _log.ErrorLn($"{strings.error}> {item.Name.Trim()} : {e.Message}"); x = Console.CursorLeft; y = Console.CursorTop; } } }
public int GetExecOrder() { return(file.GetExecOrder()); }