/// <summary> /// 重建所有索引 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ReIndexHyperLink_Click(object sender, EventArgs e) { try { //部件,主题索引 BaseControlHelper baseCtrlHelper = new BaseControlHelper(); baseCtrlHelper.CreateThemeIndex(); baseCtrlHelper.CreateWidegetsIndex(); //模板图索引 SiteSettingHelper siteSettingHelper = new SiteSettingHelper(); TemplateHelper TemplateHelper = new TemplateHelper(); string defaultTempGroupFile = siteSettingHelper.Config.DefaultTemplateGroupFileName; if (!string.IsNullOrEmpty(defaultTempGroupFile) && File.Exists(Path.Combine(TemplateHelper.TemplateGroupPath, defaultTempGroupFile))) { SkinInfo data = TemplateHelper.GetSkinInfo(defaultTempGroupFile); TemplateHelper.CreateMapFileFromSkinInfo(data); TemplateHelper.RefreshTemplateDefaultBindText(data); } } catch (Exception ex) { We7.Framework.LogHelper.WriteLog(typeof(content), ex); } }
/// <summary> /// 重建主题索引 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void CreateThemeIndex_Click(object sender, EventArgs e) { try { BaseControlHelper Helper = new BaseControlHelper(); Helper.CreateThemeIndex(); Messages.ShowMessage("重新主题索引成功"); } catch (Exception ex) { Messages.ShowError("重建主题索引失败:" + ex.Message); } }