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


C# TabController.CreateContentItem方法代码示例

本文整理汇总了C#中DotNetNuke.Entities.Tabs.TabController.CreateContentItem方法的典型用法代码示例。如果您正苦于以下问题:C# TabController.CreateContentItem方法的具体用法?C# TabController.CreateContentItem怎么用?C# TabController.CreateContentItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DotNetNuke.Entities.Tabs.TabController的用法示例。


在下文中一共展示了TabController.CreateContentItem方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnInit

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            jQuery.RequestDnnPluginsRegistration();

            cboCacheProvider.SelectedIndexChanged += cboCacheProvider_Change;
            cboCopyPage.SelectedIndexChanged += cboCopyPage_SelectedIndexChanged;
            cboFolders.SelectedIndexChanged += cboFolders_SelectedIndexChanged;
            cboParentTab.SelectedIndexChanged += cboParentTab_SelectedIndexChanged;
            cmdClearAllPageCache.Click += cmdClearAllPageCache_Click;
            cmdClearPageCache.Click += cmdClearPageCache_Click;
            cmdCopyPerm.Click += cmdCopyPerm_Click;
            cmdCopySkin.Click += cmdCopySkin_Click;
            cmdDelete.Click += cmdDelete_Click;
            cmdUpdate.Click += cmdUpdate_Click;
            editDefaultCultureButton.Command += editDefaultCultureButton_Command;
            localizePagesButton.Click += localizePagesButton_Click;
            moduleLocalization.ModuleLocalizationChanged += moduleLocalization_ModuleLocalizationChanged;
            tabLocalization.TabLocalizationChanged += tabLocalization_ModuleLocalizationChanged;
            publishPageButton.Click += publishPageButton_Click;
            rbInsertPosition.SelectedIndexChanged += rbInsertPosition_SelectedIndexChanged;
            rblCacheIncludeExclude.SelectedIndexChanged += rblCacheIncludeExclude_Change;
            readyForTranslationButton.Click += readyForTranslationButton_Click;
            cmdSubmitTranslation.Click += submitTranslation_Click;
            cmdCancelTranslation.Click += cancelTranslation_Click;
            translatedCheckbox.CheckedChanged += translatedCheckbox_CheckedChanged;
            viewDefaultCultureButton.Command += viewDefaultCultureButton_Command;
            // Verify that the current user has access to edit this module
            if (!TabPermissionController.HasTabPermission("ADD,EDIT,COPY,DELETE,MANAGE"))
            {
                Response.Redirect(Globals.AccessDeniedURL(), true);
            }
            if ((Request.QueryString["action"] != null))
            {
                _strAction = Request.QueryString["action"].ToLower();
            }

            if (Tab.ContentItemId == Null.NullInteger && Tab.TabID != Null.NullInteger)
            {
                var tabCtl = new TabController();
                //This tab does not have a valid ContentItem
                tabCtl.CreateContentItem(Tab);
                tabCtl.UpdateTab(Tab);
            }

            moduleLocalization.TabId = TabId;
            moduleLocalization.ShowEditColumn = false;
            DisableHostAdminFunctions();
        }
开发者ID:smkkstudios,项目名称:BlackandWhiteReporting,代码行数:50,代码来源:ManageTabs.ascx.cs

示例2: OnInit

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            jQuery.RequestDnnPluginsRegistration();

            ClientResourceManager.RegisterScript(Page, "~/Resources/Shared/Scripts/dnn.extensions.js", FileOrder.Js.DefaultPriority);
            ClientResourceManager.RegisterScript(Page, "~/Resources/Shared/scripts/dnn.jquery.extensions.js", FileOrder.Js.DefaultPriority + 1);
            ClientResourceManager.RegisterScript(Page, "~/DesktopModules/Admin/Tabs/ClientScripts/dnn.PageUrl.js", FileOrder.Js.DefaultPriority + 2);
            ServicesFramework.Instance.RequestAjaxAntiForgerySupport();

            cboCacheProvider.SelectedIndexChanged += cboCacheProvider_Change;
            cboCopyPage.SelectionChanged += cboCopyPage_SelectedIndexChanged;
            cboFolders.SelectionChanged += cboFolders_SelectedIndexChanged;
            cboParentTab.SelectionChanged += cboParentTab_SelectedIndexChanged;
            cmdClearAllPageCache.Click += cmdClearAllPageCache_Click;
            cmdClearPageCache.Click += cmdClearPageCache_Click;
            cmdCopyPerm.Click += cmdCopyPerm_Click;
            cmdCopySkin.Click += cmdCopySkin_Click;
            cmdDelete.Click += cmdDelete_Click;
            cmdUpdate.Click += cmdUpdate_Click;
            rblCacheIncludeExclude.SelectedIndexChanged += rblCacheIncludeExclude_Change;
            readyForTranslationButton.Click += readyForTranslationButton_Click;
            cmdSubmitTranslation.Click += submitTranslation_Click;
            cmdCancelTranslation.Click += cancelTranslation_Click;
            // Verify that the current user has access to edit this module
            if (!TabPermissionController.HasTabPermission("ADD,EDIT,COPY,DELETE,MANAGE"))
            {
                Response.Redirect(Globals.AccessDeniedURL(), true);
            }
            if ((Request.QueryString["action"] != null))
            {
                _strAction = Request.QueryString["action"].ToLower();
            }

            if (Tab.ContentItemId == Null.NullInteger && Tab.TabID != Null.NullInteger)
            {
                var tabCtl = new TabController();
                //This tab does not have a valid ContentItem
                tabCtl.CreateContentItem(Tab);
                tabCtl.UpdateTab(Tab);
            }

            DisableHostAdminFunctions();

            if (PortalSettings.ActiveTab.IsSuperTab || PortalSecurity.IsInRole("Administrators") || PortalSettings.ActiveTab.ParentId == Null.NullInteger)
            {
                // Add Non Specified if user is Admin or if current tab is already on the top level
                cboParentTab.UndefinedItem = new ListItem(SharedConstants.Unspecified, string.Empty);
            }

            cboCopyPage.UndefinedItem = new ListItem(SharedConstants.Unspecified, string.Empty);

            PortalAliasCaption.Text = PortalAlias.HTTPAlias;
            PortalAliasCaption.ToolTip = PortalAlias.HTTPAlias;
            UrlContainer.Attributes.Add(HtmlTextWriterAttribute.Class.ToString(), "um-page-url-container");
        }
开发者ID:RichardHowells,项目名称:dnnextensions,代码行数:57,代码来源:ManageTabs.ascx.cs

示例3: CopyDesignToChildren

        /// <summary>
        /// Copies the design to children.
        /// </summary>
        /// <param name="parentTab">The parent tab.</param>
        /// <param name="skinSrc">The skin SRC.</param>
        /// <param name="containerSrc">The container SRC.</param>
        /// <param name="cultureCode">The culture code.</param>
        public static void CopyDesignToChildren(TabInfo parentTab, string skinSrc, string containerSrc,
                                                string cultureCode)
        {
            bool clearCache = Null.NullBoolean;
            var tabController = new TabController();
            List<TabInfo> childTabs = tabController.GetTabsByPortal(parentTab.PortalID).DescendentsOf(parentTab.TabID);
            foreach (TabInfo tab in childTabs)
            {
                if (TabPermissionController.CanAdminPage(tab))
                {
                    //Update ContentItem If neccessary
                    if (tab.ContentItemId == Null.NullInteger && tab.TabID != Null.NullInteger)
                    {
                        tabController.CreateContentItem(tab);
                    }

                    Provider.UpdateTab(tab.TabID,
                                       tab.ContentItemId,
                                       tab.PortalID,
                                       tab.VersionGuid,
                                       tab.DefaultLanguageGuid,
                                       tab.LocalizedVersionGuid,
                                       tab.TabName,
                                       tab.IsVisible,
                                       tab.DisableLink,
                                       tab.ParentId,
                                       tab.IconFileRaw,
                                       tab.IconFileLargeRaw,
                                       tab.Title,
                                       tab.Description,
                                       tab.KeyWords,
                                       tab.IsDeleted,
                                       tab.Url,
                                       skinSrc,
                                       containerSrc,
                                       tab.StartDate,
                                       tab.EndDate,
                                       tab.RefreshInterval,
                                       tab.PageHeadText,
                                       tab.IsSecure,
                                       tab.PermanentRedirect,
                                       tab.SiteMapPriority,
                                       UserController.GetCurrentUserInfo().UserID,
                                       tab.CultureCode);

                    UpdateTabVersion(tab.TabID);

                    var eventLogController = new EventLogController();
                    eventLogController.AddLog(tab, PortalController.GetCurrentPortalSettings(),
                                              UserController.GetCurrentUserInfo().UserID, "",
                                              EventLogController.EventLogType.TAB_UPDATED);
                    clearCache = true;
                }
            }
            if (clearCache)
            {
                DataCache.ClearTabsCache(childTabs[0].PortalID);
            }
        }
开发者ID:ryanmalone,项目名称:BGDNNWEB,代码行数:66,代码来源:TabController.cs


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