public void CreateFullTextIndex_Click(object sender, EventArgs e) { #region 建立全文索引 if (this.CheckCookie()) { if (DbHelper.Provider.IsFullTextSearchEnabled() == false) { return; } try { DatabaseProvider.GetInstance().CreateFullTextIndex(DatabaseProvider.GetInstance().GetDbName()); aysncallback = new delegateCreateFillIndex(CreateFullText); AsyncCallback myCallBack = new AsyncCallback(CallBack); aysncallback.BeginInvoke(DatabaseProvider.GetInstance().GetDbName(), myCallBack, this.username); // base.LoadRegisterStartupScript("PAGE", "window.location.href='forum_updateforumstatic.aspx';"); } catch (Exception ex) { string message = ex.Message.Replace("'", " "); message = message.Replace("\\", "/"); message = message.Replace("\r\n", "\\r\\n"); message = message.Replace("\r", "\\r"); message = message.Replace("\n", "\\n"); base.RegisterStartupScript("", "<script>alert('" + message + "');</script>"); } } #endregion }
/// <summary> /// 建立全文索引 /// </summary> /// <param name="tableName">表名</param> public string CreateFullTextIndex(string tableName, string userName) { try { Discuz.Data.Databases.CreateFullTextIndex(tableName); aysncallbackFillIndex = new delegateCreateFillIndex(CreateFullText); AsyncCallback myCallBack = new AsyncCallback(CallBackFillIndex); aysncallbackFillIndex.BeginInvoke(tableName, myCallBack, userName); // return("window.location.href='forum_updateforumstatic.aspx';"); } catch (Exception ex) { return("<script>alert('" + FormatMessage(ex.Message) + "');</script>"); } }
public void CreateFullTextIndex_Click(object sender, EventArgs e) { #region 建立全文索引 if (this.CheckCookie()) { if (DbHelper.Provider.IsFullTextSearchEnabled()==false) { return; } try { DatabaseProvider.GetInstance().CreateFullTextIndex(DatabaseProvider.GetInstance().GetDbName()); aysncallback = new delegateCreateFillIndex(CreateFullText); AsyncCallback myCallBack = new AsyncCallback(CallBack); aysncallback.BeginInvoke(DatabaseProvider.GetInstance().GetDbName(), myCallBack, this.username); // base.LoadRegisterStartupScript("PAGE", "window.location.href='forum_updateforumstatic.aspx';"); } catch (Exception ex) { string message = ex.Message.Replace("'", " "); message = message.Replace("\\", "/"); message = message.Replace("\r\n", "\\r\\n"); message = message.Replace("\r", "\\r"); message = message.Replace("\n", "\\n"); base.RegisterStartupScript( "", "<script>alert('" + message + "');</script>"); } } #endregion }
/// <summary> /// 建立全文索引 /// </summary> /// <param name="tableName">表名</param> public string CreateFullTextIndex(string tableName, string userName) { try { Discuz.Data.Databases.CreateFullTextIndex(tableName); aysncallbackFillIndex = new delegateCreateFillIndex(CreateFullText); AsyncCallback myCallBack = new AsyncCallback(CallBackFillIndex); aysncallbackFillIndex.BeginInvoke(tableName, myCallBack, userName); // return "window.location.href='forum_updateforumstatic.aspx';"; } catch (Exception ex) { return "<script>alert('" + FormatMessage(ex.Message) + "');</script>"; } }