/// <summary> /// Mod By Touradg (herman_herman) 2009/10/19 /// Shrinking Database /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> protected void btnShrink_Click([NotNull] object sender, [NotNull] EventArgs e) { try { this.txtIndexStatistics.Text = LegacyDb.db_shrink_warning() + @"\r\n\{0}\r\n\".FormatWith(LegacyDb.db_shrink_new()); this.txtIndexStatistics.Text = this.GetText("ADMIN_REINDEX", "INDEX_SHRINK").FormatWith(LegacyDb.GetDBSize()); } catch (Exception error) { this.txtIndexStatistics.Text += this.GetText("ADMIN_REINDEX", "INDEX_STATS_FAIL").FormatWith(error.Message); } }
/// <summary> /// Mod By Touradg (herman_herman) 2009/10/19 /// Shrinking Database /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> protected void ShrinkClick([NotNull] object sender, [NotNull] EventArgs e) { try { this.txtIndexStatistics.Text = LegacyDb.db_shrink_warning() + @"\r\n\{0}\r\n\".FormatWith(LegacyDb.db_shrink_new()); this.txtIndexStatistics.Text = this.GetText("ADMIN_REINDEX", "INDEX_SHRINK").FormatWith(this.Get <IDbFunction>().GetDBSize()); YafBuildLink.Redirect(ForumPages.admin_reindex); } catch (Exception error) { this.txtIndexStatistics.Text += this.GetText("ADMIN_REINDEX", "INDEX_STATS_FAIL").FormatWith(error.Message); } }