本文整理汇总了C#中DotNetNuke.Entities.Tabs.TabController.ClearCache方法的典型用法代码示例。如果您正苦于以下问题:C# TabController.ClearCache方法的具体用法?C# TabController.ClearCache怎么用?C# TabController.ClearCache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DotNetNuke.Entities.Tabs.TabController
的用法示例。
在下文中一共展示了TabController.ClearCache方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MakeTranslatable_Click
protected void MakeTranslatable_Click(object sender, EventArgs e)
{
var t = new TabController();
var defaultLocale = LocaleController.Instance.GetDefaultLocale(PortalId);
t.LocalizeTab(_tab, defaultLocale);
t.AddMissingLanguages(PortalId, _tab.TabID);
t.ClearCache(PortalId);
Response.Redirect(Request.RawUrl, false);
}
示例2: SaveTabData
//.........这里部分代码省略.........
Tab.EndDate = datepickerEndDate.SelectedDate != null ? datepickerEndDate.SelectedDate.Value : Null.NullDate;
if (Tab.StartDate > Null.NullDate && Tab.EndDate > Null.NullDate && Tab.StartDate.AddDays(1) >= Tab.EndDate)
{
UI.Skins.Skin.AddModuleMessage(this, Localization.GetString("InvalidTabDates", LocalResourceFile), ModuleMessage.ModuleMessageType.RedError);
return Null.NullInteger;
}
if (!valRefreshInterval.IsValid)
{
return Null.NullInteger;
}
Tab.RefreshInterval = txtRefreshInterval.Text == "" ? Null.NullInteger : Convert.ToInt32(txtRefreshInterval.Text);
if (!valPriorityRequired.IsValid || !valPriority.IsValid)
{
return Null.NullInteger;
}
Tab.SiteMapPriority = float.Parse(txtPriority.Text);
Tab.PageHeadText = txtPageHeadText.Text;
Tab.IsSecure = chkSecure.Checked;
Tab.PermanentRedirect = chkPermanentRedirect.Checked;
UpdateTabSettings(Tab);
if (strAction == "edit")
{
// trap circular tab reference
if (cboParentTab.SelectedItem != null && Tab.TabID != cboParentTab.SelectedItemValueAsInt && !IsCircularReference(cboParentTab.SelectedItemValueAsInt, Tab.PortalID))
{
objTabs.UpdateTab(Tab);
if (IsHostMenu && Tab.PortalID != Null.NullInteger)
{
//Host Tab moved to Portal so clear Host cache
objTabs.ClearCache(Null.NullInteger);
}
if (!IsHostMenu && Tab.PortalID == Null.NullInteger)
{
//Portal Tab moved to Host so clear portal cache
objTabs.ClearCache(PortalId);
}
}
}
else
{
if (positionTabId == Null.NullInteger)
{
Tab.TabID = objTabs.AddTab(Tab);
}
else
{
if (rbInsertPosition.SelectedValue == "After" && positionTabId > Null.NullInteger)
{
Tab.TabID = objTabs.AddTabAfter(Tab, positionTabId);
}
else if (rbInsertPosition.SelectedValue == "Before" && positionTabId > Null.NullInteger)
{
Tab.TabID = objTabs.AddTabBefore(Tab, positionTabId);
}
else
{
Tab.TabID = objTabs.AddTab(Tab);
}
}
//Create Localized versions
if (PortalSettings.ContentLocalizationEnabled && cultureTypeList.SelectedValue == "Localized")
示例3: SaveTabData
//.........这里部分代码省略.........
UI.Skins.Skin.AddModuleMessage(this, Localization.GetString("TabExists", LocalResourceFile), ModuleMessage.ModuleMessageType.RedError);
}
return Null.NullInteger;
}
}
Tab.StartDate = datepickerStartDate.SelectedDate != null ? datepickerStartDate.SelectedDate.Value : Null.NullDate;
Tab.EndDate = datepickerEndDate.SelectedDate != null ? datepickerEndDate.SelectedDate.Value : Null.NullDate;
if (Tab.StartDate > Null.NullDate && Tab.EndDate > Null.NullDate && Tab.StartDate.AddDays(1) >= Tab.EndDate)
{
UI.Skins.Skin.AddModuleMessage(this, Localization.GetString("InvalidTabDates", LocalResourceFile), ModuleMessage.ModuleMessageType.RedError);
return Null.NullInteger;
}
if (txtRefreshInterval.Text.Length > 0 && Regex.IsMatch(txtRefreshInterval.Text, "^\\d+$"))
{
Tab.RefreshInterval = Convert.ToInt32(txtRefreshInterval.Text);
}
Tab.SiteMapPriority = float.Parse(txtPriority.Text);
Tab.PageHeadText = txtPageHeadText.Text;
Tab.IsSecure = chkSecure.Checked;
Tab.PermanentRedirect = chkPermanentRedirect.Checked;
if (strAction == "edit")
{
// trap circular tab reference
if (cboParentTab.SelectedItem != null && Tab.TabID != Int32.Parse(cboParentTab.SelectedItem.Value) && !IsCircularReference(Int32.Parse(cboParentTab.SelectedItem.Value), Tab.PortalID))
{
objTabs.UpdateTab(Tab);
if (IsHostMenu && Tab.PortalID != Null.NullInteger)
{
//Host Tab moved to Portal so clear Host cache
objTabs.ClearCache(Null.NullInteger);
}
if (!IsHostMenu && Tab.PortalID == Null.NullInteger)
{
//Portal Tab moved to Host so clear portal cache
objTabs.ClearCache(PortalId);
}
UpdateTabSettings(Tab.TabID);
}
// add or copy
}
else
{
if (positionTabID == Null.NullInteger)
{
Tab.TabID = objTabs.AddTab(Tab);
}
else
{
if (rbInsertPosition.SelectedValue == "After" && positionTabID > Null.NullInteger)
{
Tab.TabID = objTabs.AddTabAfter(Tab, positionTabID);
}
else if (rbInsertPosition.SelectedValue == "Before" && positionTabID > Null.NullInteger)
{
Tab.TabID = objTabs.AddTabBefore(Tab, positionTabID);
}
else
{
Tab.TabID = objTabs.AddTab(Tab);
}
}