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


C# ModuleController.UpdateModuleSetting方法代码示例

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


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

示例1: SaveSettings

        protected void SaveSettings()
        {
            ModuleController mc = new ModuleController();
            if (txtAnalyticsTrackingId.Text.Length > 0)
            {
                if (ModuleSettings.ContainsKey("GoogleTrackingId"))
                    ModuleSettings["GoogleTrackingId"] = txtAnalyticsTrackingId.Text;
                else
                    ModuleSettings.Add("GoogleTrackingId", txtAnalyticsTrackingId.Text);
                mc.UpdateModuleSetting(this.ModuleId, "GoogleTrackingId", txtAnalyticsTrackingId.Text);
            }

            if (ModuleSettings.ContainsKey("LocalHostAddress"))
                ModuleSettings["LocalHostAddress"] = txtLocalHostName.Text;
            else
                ModuleSettings.Add("LocalHostAddress", txtLocalHostName.Text );
            mc.UpdateModuleSetting(this.ModuleId, "LocalHostAddress", txtLocalHostName.Text );

            if (ddlSecurityGroups.SelectedValue != "-1")
            {
                if (ModuleSettings.ContainsKey("HideTrackingFromRole"))
                    ModuleSettings["HideTrackingFromRole"] = ddlSecurityGroups.SelectedItem.Text;
                else
                    ModuleSettings.Add("HideTrackingFromRole", ddlSecurityGroups.SelectedItem.Text);
                mc.UpdateModuleSetting(this.ModuleId, "HideTrackingFromRole", ddlSecurityGroups.SelectedItem.Text);
            }
            else
            {
                if (ModuleSettings.ContainsKey("HideTrackingFromRole"))
                    mc.DeleteModuleSetting(this.ModuleId, "HideTrackingFromRole");
            }
        }
开发者ID:goedings,项目名称:VendorLink,代码行数:32,代码来源:ScripterSettings.ascx.cs

示例2: lnkSave_OnClick

        protected void lnkSave_OnClick(object sender, EventArgs e)
        {
            try
            {
                var moduleController = new ModuleController();
                moduleController.UpdateModuleSetting(ModuleId, "Enabled", chkEnabled.Checked.ToString());
                moduleController.UpdateModuleSetting(ModuleId, "InstrumentationKey", txtInstrumentationKey.Text.Trim());
                txtInstrumentationKey.Enabled = chkEnabled.Checked;
                rqInstrumentationKey.Enabled = txtInstrumentationKey.Enabled;

                // Update the configuration files
                ModifyLog4NetConfigFile(!chkEnabled.Checked);
                ModifyAppInsightsConfigFile(!chkEnabled.Checked);
                ModifyAppInsightsJsFile(!chkEnabled.Checked);
                ModifyWebConfigFile(!chkEnabled.Checked);

                // Increment the CRM version to avoid appinsights.js caching
                HostController.Instance.IncrementCrmVersion(true);

            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
开发者ID:davidjrh,项目名称:dnn.appinsights,代码行数:25,代码来源:AppInsightsSetup.ascx.cs

示例3: UpdateSettings

        public override void UpdateSettings()
        {
            try
            {
                // actions here
                ModuleController mc = new ModuleController();

                mc.UpdateModuleSetting(ModuleId, "emailTo", aan.Text);
                mc.UpdateModuleSetting(ModuleId, "emailCC", cc.Text);
                mc.UpdateModuleSetting(ModuleId, "emailBCC", bcc.Text);
                mc.UpdateModuleSetting(ModuleId, "emailFROM", from.Text);
                mc.UpdateModuleSetting(ModuleId, "emailFROMNAME", fromname.Text);

                //refresh cache
                ModuleController.SynchronizeModule(ModuleId);
            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
            finally
            {
                DataCache.ClearPortalCache(PortalId, false);
            }
        }
开发者ID:jjzandbergen,项目名称:DNN-Simple-Contact-form-AJAX,代码行数:25,代码来源:Settings.ascx.cs

示例4: cmdSave_Click

 protected void cmdSave_Click(object sender, EventArgs e)
 {
     ModuleController mc = new ModuleController();
     mc.UpdateModuleSetting(ModuleId, "template", scriptList.SelectedValue);
     mc.UpdateModuleSetting(ModuleId, "data", HiddenField.Value);
     Response.Redirect(Globals.NavigateURL(), true);
     //DotNetNuke.UI.Skins.Skin.AddModuleMessage(this, "Update Successful", DotNetNuke.UI.Skins.Controls.ModuleMessage.ModuleMessageType.GreenSuccess);
 }
开发者ID:gitter-badger,项目名称:openform,代码行数:8,代码来源:EditSettings.ascx.cs

示例5: btnSave_Click

 protected void btnSave_Click(object sender, EventArgs e)
 {
     DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();
     objModules.UpdateModuleSetting(ModuleId, "SQLQuery", txtSqlQuery.Text);
     objModules.UpdateModuleSetting(ModuleId, "SQLTemplate", txtTemplate.Text);
     objModules.UpdateModuleSetting(ModuleId, "SQLItemTemplate", txtItemTemplate.Text);
     objModules.UpdateModuleSetting(ModuleId, "SQLRowTemplate", txtRowTemplate.Text);
     Response.Redirect(PortalSettings.ActiveTab.FullUrl.ToLower().Replace(System.Globalization.CultureInfo.CurrentUICulture.Name.ToLower() + "/", ""));
 }
开发者ID:wet-boew,项目名称:wet-boew-dotnetnuke,代码行数:9,代码来源:SQL.ascx.cs

示例6: UpdateSettings

        public override void UpdateSettings()
        {
            base.UpdateSettings();

            PortalController.UpdatePortalSetting(ModuleContext.PortalId, "EnableUrlLanguage", chkUrl.Checked.ToString());
            var modController = new ModuleController();
            modController.UpdateModuleSetting(ModuleContext.ModuleId, "UsePaging", chkUsePaging.Checked.ToString());
            modController.UpdateModuleSetting(ModuleContext.ModuleId, "PageSize", txtPageSize.Text);
        }
开发者ID:rcedev,项目名称:evans-software-solutions,代码行数:9,代码来源:LanguageSettings.ascx.cs

示例7: UpdateSettings

        public override void UpdateSettings()
        {
            base.UpdateSettings();

            //
            ModuleController mc = new ModuleController();
            mc.UpdateModuleSetting(ModuleId, "WidthSlide", txtWidth.Text);
            mc.UpdateModuleSetting(ModuleId, "HeightSlide", txtHeight.Text);
        }
开发者ID:shahinhemati,项目名称:project-example-a,代码行数:9,代码来源:Settings.ascx.cs

示例8: UpdateSettings

        public override void UpdateSettings()
        {
            base.UpdateSettings();

            var modController = new ModuleController();
            modController.UpdateModuleSetting(ModuleContext.ModuleId, "UsePaging", chkUsePaging.Checked.ToString());
            modController.UpdateModuleSetting(ModuleContext.ModuleId, "PageSize", txtPageSize.Text);
            modController.UpdateModuleSetting(ModuleContext.ModuleId, "ShowLanguages", chkShowLanguages.Checked.ToString());
            modController.UpdateModuleSetting(ModuleContext.ModuleId, "ShowSettings", chkShowSettings.Checked.ToString());
        }
开发者ID:RichardHowells,项目名称:dnnextensions,代码行数:10,代码来源:LanguageSettings.ascx.cs

示例9: SaveSettings

 public override void SaveSettings()
 {
     QueryStringParameterEditor.SavePendingEdits(this);
     var objModules = new ModuleController();
     objModules.UpdateModuleSetting(ModuleId, Setting.SourceUrl, ctlUrlxml.Text);
     objModules.UpdateModuleSetting(ModuleId, Setting.UrlEncoding, rblQueryStringEncoding.SelectedValue);
     objModules.UpdateModuleSetting(ModuleId, Setting.SourceAccount, txtAccount.Text);
     if (txtPassword.Text != FakePasswordTemplate ) objModules.UpdateModuleSetting(ModuleId, Setting.SourcePassWord, txtPassword.Text);
     objModules.UpdateModuleSetting(ModuleId, Setting.EnableCache, cbxCaching.Checked.ToString());
 }
开发者ID:DNNCommunity,项目名称:DNN.XML,代码行数:10,代码来源:Settings.ascx.cs

示例10: IsNewModuleInstance

 public bool IsNewModuleInstance()
 {
     var settings = ModuleContext.Settings;
     var mc = new ModuleController();
     var minSettings = 0;
     if (settings.ContainsKey(SettingName.ExcludeFromSearch)) minSettings++;
     if (settings.ContainsKey(SettingName.CalculatedColumnsRenderExpressionInForm)) minSettings++;
     if (settings.ContainsKey(SettingName.UseButtonsInForm)) minSettings++;
   
     if (settings.Count > minSettings) return false;
     mc.UpdateModuleSetting( ModuleId,SettingName.UseButtonsInForm, bool.TrueString );
     mc.UpdateModuleSetting(ModuleId, SettingName.ExcludeFromSearch, bool.TrueString);
     mc.UpdateModuleSetting(ModuleId, SettingName.CalculatedColumnsRenderExpressionInForm, bool.TrueString);
     return true;
 }
开发者ID:DNNCommunity,项目名称:DNN.FormAndList,代码行数:15,代码来源:Default.ascx.cs

示例11: UpdateSettings

        public override void UpdateSettings()
        {
            try
            {
                var settings = new ModuleController();
                settings.UpdateModuleSetting(this.ModuleId, ModuleSettingsNames.BlockedRole, txtRoles.Text);
                settings.UpdateModuleSetting(this.ModuleId, ModuleSettingsNames.SessionObject, txtSessionStateToClear.Text);
                ModuleController.SynchronizeModule(this.ModuleId);
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }

        }
开发者ID:GravityWorks-Scott,项目名称:GravityWorks.DNN.BecomeUser,代码行数:15,代码来源:Settings.ascx.cs

示例12: Login_Input

 protected int Login_Input()
 {
     UserLoginStatus loginStatus = new UserLoginStatus();
     UserInfo objUserInfo = UserController.ValidateUser(PortalId, tbUsername.Text, tbPassword.Text, "", PortalSettings.PortalName, Request.UserHostAddress, ref loginStatus);
     if (loginStatus == UserLoginStatus.LOGIN_SUCCESS || loginStatus == UserLoginStatus.LOGIN_SUPERUSER)
     {
         UserController.UserLogin(PortalId, objUserInfo, PortalSettings.PortalName, Request.UserHostAddress, false);
         if (cbRemember.Checked)
         {
             // Set settings
             int random = new Random().Next();
             ModuleController obModule = new ModuleController();
             obModule.UpdateModuleSetting(ModuleId, tbUsername.Text, random.ToString());
             // Set cookie
             HttpCookie obCookie = new HttpCookie(cookie_name());
             obCookie.Value = string.Format("{0}_{1}", random, tbUsername.Text);
             obCookie.Expires = DateTime.Today.AddMonths(3);
             Response.Cookies.Add(obCookie);
             obCookie = new HttpCookie("EOFFICE");
             obCookie.Value = Request.ApplicationPath;
             obCookie.Expires = DateTime.Today.AddYears(1);
             obCookie.HttpOnly = false;
             Response.Cookies.Add(obCookie);
         }
         return 1;
     }
     else
     {
         lbError.Text = "Tên đăng nhập hoặc Mật khẩu không chính xác";
         return 0;
     }
 }
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:32,代码来源:Login.ascx.cs

示例13: UpdateModuleSettingForAllLanguages

        /// <summary>
        /// Update a setting for all language-versions of a module
        /// </summary>
        public static void UpdateModuleSettingForAllLanguages(int moduleId, string key, string value)
        {
            var moduleController = new ModuleController();

            // Find this module in other languages and update contentGroupGuid
            var originalModule = moduleController.GetModule(moduleId);
            var languages = LocaleController.Instance.GetLocales(originalModule.PortalID);

            if (!originalModule.IsDefaultLanguage && originalModule.DefaultLanguageModule != null)
                originalModule = originalModule.DefaultLanguageModule;

            foreach (var language in languages)
            {
                // Find module for given Culture
                var moduleByCulture = moduleController.GetModuleByCulture(originalModule.ModuleID, originalModule.TabID, originalModule.PortalID, language.Value);

                // Break if no module found
                if (moduleByCulture == null)
                    continue;

                if (value == null)
                    moduleController.DeleteModuleSetting(moduleByCulture.ModuleID, key);
                else
                    moduleController.UpdateModuleSetting(moduleByCulture.ModuleID, key, value);
            }
        }
开发者ID:2sic,项目名称:2sxc,代码行数:29,代码来源:DnnStuffToRefactor.cs

示例14: UpdateSettings

        public override void UpdateSettings()
        {
            ModuleController settings = new ModuleController();

            settings.UpdateModuleSetting(ModuleId, ModuleSettingNames.MySetting1, txtMySetting1.Text);

            //refresh cache
            ModuleController.SynchronizeModule(ModuleId);
        }
开发者ID:trantruong2007,项目名称:angeldnn,代码行数:9,代码来源:Settings.ascx.cs

示例15: SaveSettings

 public override void SaveSettings()
 {
     if (Page.IsValid & UrlAccessIsPermitted)
     {
         PedXsl.SavePendingEdits(this);
         // Update settings in the database
         var objModules = new ModuleController();
         objModules.UpdateModuleSetting(ModuleId, Setting.TransUrl, UrlXsl.Url);
     }
 }
开发者ID:DNNCommunity,项目名称:DNN.XML,代码行数:10,代码来源:Settings.ascx.cs


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