/// <summary> /// Sets the Revovery mode /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> protected void RecoveryModeClick([NotNull] object sender, [NotNull] EventArgs e) { var recoveryMode = string.Empty; switch (this.RadioButtonList1.SelectedIndex) { case 0: recoveryMode = "FULL"; break; case 1: recoveryMode = "SIMPLE"; break; case 2: recoveryMode = "BULK_LOGGED"; break; } var error = LegacyDb.db_recovery_mode_new(recoveryMode); if (error.IsSet()) { this.txtIndexStatistics.Text = LegacyDb.db_recovery_mode_warning() + this.GetText("ADMIN_REINDEX", "INDEX_STATS_FAIL").FormatWith(error); } else { this.txtIndexStatistics.Text = this.GetText("ADMIN_REINDEX", "INDEX_STATS").FormatWith(recoveryMode); this.txtIndexStatistics.Text = LegacyDb.db_recovery_mode_warning() + "\r\n{0}".FormatWith(LegacyDb.db_recovery_mode_new(recoveryMode)); } }