当前位置: 首页>>代码示例>>C#>>正文


C# TabController.ClearCache方法代码示例

本文整理汇总了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);
 }
开发者ID:RichardHowells,项目名称:dnnextensions,代码行数:9,代码来源:ManageTabs.ascx.cs

示例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")
开发者ID:RichardHowells,项目名称:dnnextensions,代码行数:67,代码来源:ManageTabs.ascx.cs

示例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);
                    }
                }
开发者ID:smkkstudios,项目名称:BlackandWhiteReporting,代码行数:66,代码来源:ManageTabs.ascx.cs


注:本文中的DotNetNuke.Entities.Tabs.TabController.ClearCache方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。