• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Tabs.TabInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



TabInfo类属于DotNetNuke.Entities.Tabs命名空间,在下文中一共展示了TabInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: AddCoursePage

        public TabInfo AddCoursePage(string tabName, string tabTitle)
        {
            PortalSettings portalSettings = new PortalSettings();
            int portalId = portalSettings.PortalId;

            TabController tabController = new TabController();
            TabInfo getTab = tabController.GetTabByName(tabName, portalId);
            if (getTab != null)
                throw new Exception("Cannot create Page. Page with this PageName already exists");

            TabInfo newTab = new TabInfo();
            newTab.PortalID = portalId;
            newTab.TabName = tabName;
            newTab.Title = tabTitle;
            newTab.SkinSrc = "[G]Skins/20047-UnlimitedColorPack-033/CoursePage.ascx";
            newTab.ContainerSrc = portalSettings.DefaultPortalContainer;
            CommonTabSettings(newTab);
            AddViewPermissions(newTab);

            int tabId = tabController.AddTab(newTab, true);
            DotNetNuke.Common.Utilities.DataCache.ClearModuleCache(tabId);

            AddTabURL(newTab); //Makes the URL of Page /4 or /C4

            // add modules to new page

            AddModuleToPage(newTab, ModuleType.DisplayCourse);

            AddModuleToPage(newTab, ModuleType.Rating);

            AddModuleToPage(newTab, ModuleType.Comments);

            return newTab;
        }
开发者ID:Jochumzen,项目名称:DisplayPluggOld,代码行数:34,代码来源:DNN.cs


示例2: UpgradeModule

        /// <summary>
        /// Upgrades the module.
        /// </summary>
        /// <param name="Version">The version.</param>
        /// <returns>System.String.</returns>
        public string UpgradeModule(string Version)
        {
            TabController tabs = new TabController();
            foreach (PortalInfo p in new PortalController().GetPortals())
            {
                TabInfo tabInfo = tabs.GetTabByName("Vanity Urls", p.PortalID);
                if (tabInfo == null)
                {

                    tabInfo = new TabInfo();
                    tabInfo.TabID = -1;
                    tabInfo.ParentId = tabs.GetTabByName("Admin", p.PortalID).TabID;
                    tabInfo.PortalID = p.PortalID;
                    tabInfo.TabName = "Vanity Urls";
                    try
                    {
                        int tabId = tabs.AddTab(tabInfo);
                        AddModuleToPage(p.PortalID, tabId);
                        return "Vanity Urls page added";
                    }
                    catch (Exception ex)
                    {
                        DotNetNuke.Services.Exceptions.Exceptions.LogException(ex);
                    }
                }
            }

            return "";
        }
开发者ID:jsheely,项目名称:DotNetNuke-VanityUrls,代码行数:34,代码来源:DNNController.cs


示例3: FriendlyUrl

 internal override string FriendlyUrl(TabInfo tab, string path, string pageName, PortalSettings portalSettings)
 {
     if (portalSettings == null)
     {
         throw new ArgumentNullException("portalSettings");
     }
     return FriendlyUrlInternal(tab, path, pageName, String.Empty, portalSettings);
 }
开发者ID:ryanmalone,项目名称:BGDNNWEB,代码行数:8,代码来源:AdvancedFriendlyUrlProvider.cs


示例4: GivenThereIsAPageCalled

        public void GivenThereIsAPageCalled(string pageName, Table permissions)
        {
            var reset = false;
            var tabController = new TabController();
            var tab = tabController.GetTabByName(pageName, PortalId);
            if (tab == null)
            {
                tab = new TabInfo
                {
                    TabName = pageName,
                    PortalID = 0
                };
                tab.TabID = tabController.AddTab(tab);
                foreach (var row in permissions.Rows)
                {
                    var roleId = -1;
                    var roleController = new RoleController();
                    if (row[0] == "All Users")
                    {
                        roleId = -1;
                    }
                    else
                    {
                        var role = roleController.GetRoleByName(PortalId, row[0]);
                        if (role == null)
                        {
                            if (roleController.GetRoleByName(Null.NullInteger, row[0]) == null)
                            {
                                role = new RoleInfo { RoleName = row[0], RoleGroupID = Null.NullInteger };
                                roleId = roleController.AddRole(role);
                            }
                        }
                    }
                    var permissionController = new PermissionController();
                    var permission = permissionController.GetPermissionByCodeAndKey("SYSTEM_TAB", row[1]);
                    var tabPermission = new TabPermissionInfo
                    {
                        PermissionID = 3,
                        TabID = tab.TabID,
                        AllowAccess = true,
                        RoleID = roleId
                    };
                    tab.TabPermissions.Add(tabPermission);
                }

                tabController.UpdateTab(tab);
                reset = true;
            }
            Page = tab;
            if (reset)
            {
                Config.Touch();
            }
        }
开发者ID:biganth,项目名称:Curt,代码行数:54,代码来源:PageSteps.cs


示例5: MustHaveTestPageAdded

 public void MustHaveTestPageAdded()
 {
     //Create a tabInfo obj, then use TabController AddTab Method?
     TabInfo newPage = new TabInfo();
     newPage.TabName = "Test Page";
     newPage.PortalID = 0;
     newPage.SkinSrc = "[G]Skins/Aphelia/twoColumn-rightAside.ascx";
     newPage.ContainerSrc = "[G]Containers/Aphelia/Title.ascx";
     TabController tabController = new TabController();
     var tab = tabController.GetTabByName("Test Page", 0);
     if (tab == null)
     {
         try
         {
             tabController.AddTab(newPage);
         }
         catch (Exception exc)
         {
             Assert.IsTrue(false, "Add Tab result: " + exc.Message);
         }
         //tabController.AddTab(newPage);
         newPage = tabController.GetTabByName("Test Page", 0);
         TabPermissionInfo tabPermission = new TabPermissionInfo();
         tabPermission.PermissionID = 3;
         tabPermission.TabID = newPage.TabID;
         tabPermission.AllowAccess = true;
         tabPermission.RoleID = 0;
         newPage.TabPermissions.Add(tabPermission);
         try
         {
             tabController.UpdateTab(newPage);
         }
         catch (Exception exc)
         {
             Assert.IsTrue(false, "Update Tab result: " + exc.Message);
         }
         newPage = tabController.GetTabByName("Test Page", 0);
         tabPermission.RoleID = 0;
         tabPermission.PermissionID = 4;
         tabPermission.TabID = newPage.TabID;
         tabPermission.AllowAccess = true;
         newPage.TabPermissions.Add(tabPermission);
         try
         {
             tabController.UpdateTab(newPage);
         }
         catch (Exception exc)
         {
             Assert.IsTrue(false, "Update Tab Permissions result: " + exc.Message);
         }
         Thread.Sleep(1500);
     }
 }
开发者ID:ryanmalone,项目名称:BGDNNWEB,代码行数:53,代码来源:BasePageSteps.cs


示例6: IsExcludedFromFriendlyUrls

        /// <summary>
        /// Determines if the tab is excluded from FriendlyUrl Processing
        /// </summary>
        /// <param name="tab"></param>
        /// <param name="settings"></param>
        /// <param name="rewriting">If true, we are checking for rewriting purposes, if false, we are checking for friendly Url Generating.</param>
        /// <returns></returns>
        private static bool IsExcludedFromFriendlyUrls(TabInfo tab, FriendlyUrlSettings settings, bool rewriting)
        {
            //note this is a duplicate of another method in RewriteController.cs
            bool exclude = false;
            string tabPath = (tab.TabPath.Replace("//", "/") + ";").ToLower();
            if (settings.UseBaseFriendlyUrls != null)
            {
                exclude = settings.UseBaseFriendlyUrls.ToLower().Contains(tabPath);
            }

            return exclude;
        }
开发者ID:rut5949,项目名称:Dnn.Platform,代码行数:19,代码来源:FriendlyUrlController.cs


示例7: AddChildTabsToList

 private static void AddChildTabsToList(TabInfo currentTab, ref TabCollection allPortalTabs, ref IDictionary<int, TabInfo> tabsWithModule, ref IDictionary<int, TabInfo> tabsInOrder)
 {
     if ((tabsWithModule.ContainsKey(currentTab.TabID) && !tabsInOrder.ContainsKey(currentTab.TabID)))
     {
         //add current tab
         tabsInOrder.Add(currentTab.TabID, currentTab);
         //add children of current tab
         foreach (TabInfo tab in allPortalTabs.WithParentId(currentTab.TabID))
         {
             AddChildTabsToList(tab, ref allPortalTabs, ref tabsWithModule, ref tabsInOrder);
         }
     }
 }
开发者ID:ashishpd,项目名称:DnnMobile,代码行数:13,代码来源:HelperController.cs


示例8: AddAllTabsModules

        private static void AddAllTabsModules(TabInfo tab)
        {
            var objmodules = new ModuleController();
        	var portalSettings = new PortalSettings(tab.TabID, tab.PortalID);
            foreach (ModuleInfo allTabsModule in objmodules.GetAllTabsModules(tab.PortalID, true))
            {
                //[DNN-6276]We need to check that the Module is not implicitly deleted.  ie If all instances are on Pages
                //that are all "deleted" then even if the Module itself is not deleted, we would not expect the 
                //Module to be added
                var canAdd =
                (from ModuleInfo allTabsInstance in objmodules.GetModuleTabs(allTabsModule.ModuleID) select new TabController().GetTab(allTabsInstance.TabID, tab.PortalID, false)).Any(
					t => !t.IsDeleted) && (!portalSettings.ContentLocalizationEnabled || allTabsModule.CultureCode == portalSettings.CultureCode);
                if (canAdd)
                {
                    objmodules.CopyModule(allTabsModule, tab, Null.NullString, true);
                }
            }
        }
开发者ID:biganth,项目名称:Curt,代码行数:18,代码来源:TabController.cs


示例9: GetFriendlyUrlTabPath

        /// <summary>
        /// Get the tab path for the supplied Tab
        /// </summary>
        /// <param name="tab"></param>
        /// <param name="options"></param>
        /// <param name="parentTraceId"></param>
        /// <returns></returns>
        internal static string GetFriendlyUrlTabPath(TabInfo tab, FriendlyUrlOptions options, Guid parentTraceId)
        {
            string baseTabPath = tab.TabPath.Replace("//", "/").TrimStart('/');
            if (options.CanGenerateNonStandardPath)
            {
                //build up a non-space version of the tab path 
                baseTabPath = BuildTabPathWithReplacement(tab, options, parentTraceId);
                baseTabPath = baseTabPath.Replace("//", "/");

                //automatic diacritic conversion
                if (options.ConvertDiacriticChars)
                {
                    bool diacriticsChanged;
                    baseTabPath = ReplaceDiacritics(baseTabPath, out diacriticsChanged);
                }
            }
            return baseTabPath;
        }
开发者ID:rut5949,项目名称:Dnn.Platform,代码行数:25,代码来源:TabPathController.cs


示例10: AppendToTabPath

 private static string AppendToTabPath(string path, TabInfo tab, FriendlyUrlOptions options, out bool modified)
 {
     string tabName = tab.TabName;
     var result = new StringBuilder(tabName.Length);
     //922 : change to harmonise cleaning of tab + other url name items
     tabName = FriendlyUrlController.CleanNameForUrl(tabName, options, out modified);
     if (!modified
         && string.IsNullOrEmpty(options.PunctuationReplacement) == false
         && tab.TabName.Contains(" ")
         && tabName.Contains(" ") == false)
     {
         modified = true;
         //spaces replaced - the modified parameter is for all other replacements but space replacements
     }
     result.Append(tabName);
     result.Insert(0, "//");
     result.Insert(0, path); //effectively adds result to the end of the path
     return result.ToString();
 }
开发者ID:rut5949,项目名称:Dnn.Platform,代码行数:19,代码来源:TabPathController.cs


示例11: AddModuleToPage

        ///-----------------------------------------------------------------------------
        ///<summary>
        ///  AddModuleToPage adds a module to a Page
        ///</summary>
        ///<remarks>
        ///</remarks>
        ///<param name = "page">The Page to add the Module to</param>
        ///<param name = "moduleDefId">The Module Deinition Id for the module to be aded to this tab</param>
        ///<param name = "moduleTitle">The Module's title</param>
        ///<param name = "moduleIconFile">The Module's icon</param>
        ///<param name = "inheritPermissions">Inherit the Pages View Permisions</param>
        ///<history>
        ///  [cnurse]	11/16/2004	created
        ///</history>
        ///-----------------------------------------------------------------------------
        public static int AddModuleToPage(TabInfo page, int moduleDefId, string moduleTitle, string moduleIconFile, bool inheritPermissions)
        {
            var moduleController = new ModuleController();
            ModuleInfo moduleInfo;
            int moduleId = Null.NullInteger;

            if ((page != null))
            {
                bool isDuplicate = false;
                foreach (var kvp in moduleController.GetTabModules(page.TabID))
                {
                    moduleInfo = kvp.Value;
                    if (moduleInfo.ModuleDefID == moduleDefId)
                    {
                        isDuplicate = true;
                        moduleId = moduleInfo.ModuleID;
                    }
                }

                if (!isDuplicate)
                {
                    moduleInfo = new ModuleInfo
                    {
                        ModuleID = Null.NullInteger,
                        PortalID = page.PortalID,
                        TabID = page.TabID,
                        ModuleOrder = -1,
                        ModuleTitle = moduleTitle,
                        PaneName = Globals.glbDefaultPane,
                        ModuleDefID = moduleDefId,
                        CacheTime = 0,
                        IconFile = moduleIconFile,
                        AllTabs = false,
                        Visibility = VisibilityState.None,
                        InheritViewPermissions = inheritPermissions
                    };
                    moduleId = moduleController.AddModule(moduleInfo);
                }
            }

            return moduleId;
        }
开发者ID:ryanmalone,项目名称:BGDNNWEB,代码行数:57,代码来源:ExtensionSteps.cs


示例12: CreatePage

        private TabInfo CreatePage(TabInfo tab, int portalId, int parentTabId, string tabName, bool includeInMenu)
        {
            int id = -1;
            var tc = new TabController();
            var tPermissions = new TabPermissionCollection();
            var newTab = new TabInfo();
            if ((tab != null))
            {
                foreach (TabPermissionInfo t in tab.TabPermissions)
                {
                    var tNew = new TabPermissionInfo
                                   {
                                       AllowAccess = t.AllowAccess,
                                       DisplayName = t.DisplayName,
                                       ModuleDefID = t.ModuleDefID,
                                       PermissionCode = t.PermissionCode,
                                       PermissionID = t.PermissionID,
                                       PermissionKey = t.PermissionKey,
                                       PermissionName = t.PermissionName,
                                       RoleID = t.RoleID,
                                       RoleName = t.RoleName,
                                       TabID = -1,
                                       TabPermissionID = -1,
                                       UserID = t.UserID,
                                       Username = t.Username
                                   };
                    newTab.TabPermissions.Add(t);
                }
            }
            newTab.ParentId = parentTabId;
            newTab.PortalID = portalId;
            newTab.TabName = tabName;
            newTab.Title = tabName;
            newTab.IsVisible = includeInMenu;
            newTab.SkinSrc = "[G]Skins/DarkKnight/2-Column-Right-SocialProfile-Mega-Menu.ascx";
            id = tc.AddTab(newTab);
            tab = tc.GetTab(id, portalId, true);

            return tab;
        }
开发者ID:biganth,项目名称:Curt,代码行数:40,代码来源:Setup.ascx.cs


示例13: CreateLocalizedCopy

 public void CreateLocalizedCopy(TabInfo originalTab, Locale locale)
 {
     CreateLocalizedCopy(originalTab, locale, true);
 }
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:4,代码来源:TabController.cs


示例14: CheckFor301RedirectExclusion

 private static bool CheckFor301RedirectExclusion(int tabId, int portalId, bool checkBaseUrls, out TabInfo tab, FriendlyUrlSettings settings)
 {
     bool doRedirect = false;
     tab = TabController.Instance.GetTab(tabId, portalId, false);
     //don't redirect unless allowed, the tab is valid, and it's not an admin or super tab 
     if (tab != null && tab.IsSuperTab == false && !tab.DoNotRedirect)
     {
         if (checkBaseUrls)
         {
             //no redirect for friendly url purposes if the tab is in the 'base friendly urls' section
             doRedirect = !RewriteController.IsExcludedFromFriendlyUrls(tab, settings, true);
         }
         else
         {
             doRedirect = true;
         }
     }
     return doRedirect;
 }
开发者ID:davidsports,项目名称:Dnn.Platform,代码行数:19,代码来源:AdvancedUrlRewriter.cs


示例15: RenderTabNode

        /// <summary>
        /// Renders the tab node.
        /// </summary>
        /// <param name="parentNode">The parent node.</param>
        /// <param name="tabInfo">The tab info.</param>
        /// <param name="moduleController">The module controller.</param>
        /// <param name="editorHostSettings">The editor host settings.</param>
        private void RenderTabNode(
            TreeNode parentNode,
            TabInfo tabInfo,
            ModuleController moduleController,
            List<EditorHostSetting> editorHostSettings)
        {
            var tabKey = string.Format("DNNCKT#{0}#", tabInfo.TabID);

            var tabSettingsExists = SettingsUtil.CheckExistsPortalOrPageSettings(editorHostSettings, tabKey);

            // Tabs
            var tabNode = new TreeNode
                              {
                                  Text = tabInfo.TabName,
                                  Value = string.Format("t{0}", tabInfo.TabID),
                                  ImageUrl =
                                      tabSettingsExists
                                          ? "../images/PageHasSetting.png"
                                          : "../images/PageNoSetting.png"
                              };

            if (tabInfo.HasChildren)
            {
                foreach (var childTab in TabController.GetTabsByParent(tabInfo.TabID, tabInfo.PortalID))
                {
                    this.RenderTabNode(tabNode, childTab, moduleController, editorHostSettings);
                }
            }

            var modules = moduleController.GetTabModules(tabInfo.TabID).Values;

            foreach (var moduleNode in from moduleInfo in modules
                                       let moduleKey = string.Format("DNNCKMI#{0}#INS#", moduleInfo.ModuleID)
                                       let moduleSettingsExists =
                                           SettingsUtil.CheckExistsModuleSettings(moduleKey, moduleInfo.ModuleID)
                                       select
                                           new TreeNode
                                               {
                                                   Text = moduleInfo.ModuleTitle,
                                                   ImageUrl =
                                                       moduleSettingsExists
                                                           ? "../images/ModuleHasSetting.png"
                                                           : "../images/ModuleNoSetting.png",
                                                   Value = string.Format("m{0}", moduleInfo.ModuleID)
                                               })
            {
                tabNode.ChildNodes.Add(moduleNode);
            }

            parentNode.ChildNodes.Add(tabNode);
        }
开发者ID:huoxudong125,项目名称:dnnckeditor,代码行数:58,代码来源:EditorConfigManager.ascx.cs


示例16: GetUrlFromExtensionUrlProviders

        internal static bool GetUrlFromExtensionUrlProviders(int portalId, 
                                                                TabInfo tab, 
                                                                FriendlyUrlSettings settings,
                                                                string friendlyUrlPath, 
                                                                string cultureCode,
                                                                ref string endingPageName, 
                                                                out string changedPath,
                                                                out bool changeToSiteRoot, 
                                                                ref List<string> messages,
                                                                Guid parentTraceId)
        {
            bool wasChanged = false;
            changedPath = friendlyUrlPath;
            changeToSiteRoot = false;
            ExtensionUrlProvider activeProvider = null;
            if (messages == null)
            {
                messages = new List<string>();
            }
            try
            {
                List<ExtensionUrlProvider> providersToCall = GetProvidersToCall(tab.TabID, portalId, settings,
                                                                             parentTraceId);
                FriendlyUrlOptions options = UrlRewriterUtils.GetOptionsFromSettings(settings);
                foreach (ExtensionUrlProvider provider in providersToCall)
                {
                    activeProvider = provider; //keep for exception purposes
                    bool useDnnPagePath;
                    //go through and call each provider to generate the friendly urls for the module
                    string customPath = provider.ChangeFriendlyUrl(tab, 
                                                                friendlyUrlPath, 
                                                                options, 
                                                                cultureCode,
                                                                ref endingPageName, 
                                                                out useDnnPagePath, 
                                                                ref messages);

                    if (string.IsNullOrEmpty(endingPageName))
                    {
                        endingPageName = Globals.glbDefaultPage; //set back to default.aspx if provider cleared it
                    }
                    //now check to see if a change was made or not.  Don't trust the provider.
                    if (!string.IsNullOrEmpty(customPath))
                    {
                        //was customPath any different to friendlyUrlPath?
                        if (String.CompareOrdinal(customPath, friendlyUrlPath) != 0)
                        {
                            wasChanged = true;
                            changedPath = customPath.Trim();
                            changeToSiteRoot = !useDnnPagePath; //useDNNpagePath means no change to site root.
                            const string format = "Path returned from {0} -> path:{1}, ending Page:{2}, use Page Path:{3}";
                            messages.Add(string.Format(format, provider.ProviderConfig.ProviderName, customPath, endingPageName, useDnnPagePath));
                            break; //first module provider to change the Url is the only one used
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                LogModuleProviderExceptionInRequest(ex, "500 Internal Server Error", activeProvider, null, messages);
                //reset all values to defaults
                wasChanged = false;
                changedPath = friendlyUrlPath;
                changeToSiteRoot = false;
            }
            return wasChanged;
        }
开发者ID:rrsc,项目名称:Dnn.Platform,代码行数:67,代码来源:ExtensionUrlProviderController.cs


示例17: UpdateTabOrder

 public void UpdateTabOrder(TabInfo objTab)
 {
     Provider.UpdateTabOrder(objTab.TabID, objTab.TabOrder, objTab.ParentId,
                             UserController.Instance.GetCurrentUserInfo().UserID);
     UpdateTabVersion(objTab.TabID);
     EventLogController.Instance.AddLog(objTab, PortalController.Instance.GetCurrentPortalSettings(),
                               UserController.Instance.GetCurrentUserInfo().UserID, "",
                               EventLogController.EventLogType.TAB_ORDER_UPDATED);
     ClearCache(objTab.PortalID);
 }
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:10,代码来源:TabController.cs


示例18: UpdateTab

 public void UpdateTab(TabInfo updatedTab, string cultureCode)
 {
     updatedTab.CultureCode = cultureCode;
     UpdateTab(updatedTab);
 }
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:5,代码来源:TabController.cs


示例19: FriendlyUrl

 public string FriendlyUrl(TabInfo tab, string path, string pageName, PortalSettings settings)
 {
     return Globals.FriendlyUrl(tab, path, pageName, settings);
 }
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:4,代码来源:GlobalsImpl.cs


示例20: AddPage

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// AddPage adds a Tab Page
        /// </summary>
        ///	<param name="portalId">The Id of the Portal</param>
        ///	<param name="parentId">The Id of the Parent Tab</param>
        ///	<param name="tabName">The Name to give this new Tab</param>
        /// <param name="description">Description.</param>
        ///	<param name="tabIconFile">The Icon for this new Tab</param>
        /// <param name="tabIconFileLarge">The large Icon for this new Tab</param>
        ///	<param name="isVisible">A flag indicating whether the tab is visible</param>
        ///	<param name="permissions">Page Permissions Collection for this page</param>
        /// <param name="isAdmin">Is and admin page</param>
        /// <history>
        /// 	[cnurse]	11/11/2004	created 
        /// </history>
        /// -----------------------------------------------------------------------------
        private static TabInfo AddPage(int portalId, int parentId, string tabName, string description, string tabIconFile, string tabIconFileLarge, bool isVisible, TabPermissionCollection permissions, bool isAdmin)
        {
            DnnInstallLogger.InstallLogInfo(Localization.Localization.GetString("LogStart", Localization.Localization.GlobalResourceFile) + "AddPage:" + tabName);

            TabInfo tab = TabController.Instance.GetTabByName(tabName, portalId, parentId);

            if (tab == null || tab.ParentId != parentId)
            {
                tab = new TabInfo
                          {
                              TabID = Null.NullInteger,
                              PortalID = portalId,
                              TabName = tabName,
                              Title = "",
                              Description = description,
                              KeyWords = "",
                              IsVisible = isVisible,
                              DisableLink = false,
                              ParentId = parentId,
                              IconFile = tabIconFile,
                              IconFileLarge = tabIconFileLarge,
                              IsDeleted = false
                          };
                tab.TabID = TabController.Instance.AddTab(tab, !isAdmin);

                if (((permissions != null)))
                {
                    foreach (TabPermissionInfo tabPermission in permissions)
                    {
                        tab.TabPermissions.Add(tabPermission, true);
                    }
                    TabPermissionController.SaveTabPermissions(tab);
                }
            }
            return tab;
        }
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:53,代码来源:Upgrade.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Urls.FriendlyUrlSettings类代码示例发布时间:2022-05-24
下一篇:
C# Tabs.TabController类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap