private void EmptyTable() { var userAgrees = dialogService.AskForUserAgreement("MessageBox_EmptyTable", "MessageBoxTitle_EmptyTable", tableName); if (!userAgrees) { return; } using (var tableHandler = new TableHandler(Properties.Settings.Default.CurrentDatabase)) { tableHandler.EmptyTable(TableName); RowCount = 0; } }
internal void EmptyTable(string tableName) { var userAgrees = dialogService.AskForUserAgreement("MessageBox_EmptyTable", "MessageBoxTitle_EmptyTable", tableName); if (!userAgrees) { return; } using (var tableHandler = new TableHandler(Properties.Settings.Default.CurrentDatabase)) { try { tableHandler.EmptyTable(tableName); } catch (Exception ex) { log.Error("Failed to empty table" + tableName, ex); StatusBarInfo = ex.Message; } } }