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


C# ModuleController.DeleteModuleSettings方法代码示例

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


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

示例1: DeleteTab

        public void DeleteTab(TabInfo t)
        {
            PortalSettings portalSettings = new PortalSettings();
            int portalId = portalSettings.PortalId;

            if (t != null)
            {
                TabController tc = new TabController();
                if (t != null)
                {
                    if (t.Modules != null)
                    {
                        foreach (ModuleInfo mod in t.Modules)
                        {
                            ModuleController moduleC = new ModuleController();
                            moduleC.DeleteModule(mod.ModuleID);
                            moduleC.DeleteModuleSettings(mod.ModuleID);
                        }
                    }

                    tc.DeleteTab(t.TabID, portalId);
                    tc.DeleteTabSettings(t.TabID);
                    DataCache.ClearModuleCache(t.TabID);
                }
            }
        }
开发者ID:Jochumzen,项目名称:DisplayPluggOld,代码行数:26,代码来源:DNN.cs

示例2: SaveSettings

        private void SaveSettings()
        {
            ModuleController ctlModule = new ModuleController();
            var sec = new Security.PortalSecurity();
            ctlModule.DeleteModuleSettings(this.ModuleId);
            ctlModule.DeleteTabModuleSettings(this.TabModuleId);

            Entities.Portals.PortalController.UpdatePortalSetting(PortalId, "wnsDisqusApplicationName", sec.InputFilter(txtAppName.Text, PortalSecurity.FilterFlag.NoMarkup), true, PortalSettings.CultureCode);
            Entities.Portals.PortalController.UpdatePortalSetting(PortalId, "wnsDisqusApiSecret", sec.InputFilter(txtApiSecret.Text, PortalSecurity.FilterFlag.NoMarkup), true, PortalSettings.CultureCode);
            Entities.Portals.PortalController.UpdatePortalSetting(PortalId, "wnsDisqusRequireDnnLogin", chkRequireDnnLogin.Checked.ToString(), true, PortalSettings.CultureCode);
            Entities.Portals.PortalController.UpdatePortalSetting(PortalId, "wnsDisqusDeveloperMode", chkDeveloperMode.Checked.ToString(), true, PortalSettings.CultureCode);
            Entities.Portals.PortalController.UpdatePortalSetting(PortalId, "wnsDisqusSsoEnabled", chkSsoEnabled.Checked.ToString(), true);
            Entities.Portals.PortalController.UpdatePortalSetting(PortalId, "wnsDisqusSsoApiKey", sec.InputFilter(txtSsoApiKey.Text, PortalSecurity.FilterFlag.NoMarkup), true);

            if (UserInfo.IsSuperUser)
            {
                // save & apply schedule preferences
                ManageSchedulerItem();
            }

            ctlModule.UpdateTabModuleSetting(this.TabModuleId, "DisqusView", this.cboModuleView.SelectedValue);

            switch (this.cboModuleView.SelectedValue)
            {
                case "comments":
                    ctlModule.UpdateTabModuleSetting(this.TabModuleId, "AttachedModuleId", this.cboModuleList.SelectedValue);
                    break;
                case "combination":
                    ctlModule.UpdateTabModuleSetting(this.TabModuleId, "DisplayItems", this.cboDisplayItems.SelectedValue);
                    ctlModule.UpdateTabModuleSetting(this.TabModuleId, "ShowModerators", this.chkShowModerators.Checked.ToString());
                    ctlModule.UpdateTabModuleSetting(this.TabModuleId, "ColorTheme", this.cboColorTheme.SelectedValue);
                    ctlModule.UpdateTabModuleSetting(this.TabModuleId, "DefaultTab", this.cboDefaultTab.SelectedValue);
                    ctlModule.UpdateTabModuleSetting(this.TabModuleId, "CommentLength", sec.InputFilter(this.txtCommentLength.Text, PortalSecurity.FilterFlag.NoMarkup));
                    break;
                case "recent-comments":
                    ctlModule.UpdateTabModuleSetting(this.TabModuleId, "DisplayItems", this.cboDisplayItems.SelectedValue);
                    ctlModule.UpdateTabModuleSetting(this.TabModuleId, "ShowAvatar", this.chkShowAvatar.Checked.ToString());
                    ctlModule.UpdateTabModuleSetting(this.TabModuleId, "AvatarSize", this.cboAvatarSize.SelectedValue);
                    ctlModule.UpdateTabModuleSetting(this.TabModuleId, "CommentLength", sec.InputFilter(this.txtCommentLength.Text, PortalSecurity.FilterFlag.NoMarkup));
                    break;
                case "popular-threads":
                    ctlModule.UpdateTabModuleSetting(this.TabModuleId, "DisplayItems", this.cboDisplayItems.SelectedValue);
                    break;
                case "top-commenters":
                    ctlModule.UpdateTabModuleSetting(this.TabModuleId, "DisplayItems", this.cboDisplayItems.SelectedValue);
                    ctlModule.UpdateTabModuleSetting(this.TabModuleId, "ShowModerators", this.chkShowModerators.Checked.ToString());
                    ctlModule.UpdateTabModuleSetting(this.TabModuleId, "ShowAvatar", this.chkShowAvatar.Checked.ToString());
                    ctlModule.UpdateTabModuleSetting(this.TabModuleId, "AvatarSize", this.cboAvatarSize.SelectedValue);
                    break;
            }

            ModuleController.SynchronizeModule(this.ModuleId);
        }
开发者ID:nvisionative,项目名称:dnnextensions,代码行数:53,代码来源:Edit.ascx.cs


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