コード例 #1
0
        /// <summary>
        ///   IPortable:Import
        /// </summary>
        public void ImportModule(int moduleId, string content, string version, int userId)
        {
            XmlNode node;
            var nodes = Globals.GetContent(content, Portable.ModuleElement);
            var objModules = new ModuleController();
            var nameOfXmlDataProvider = string.Empty;
            var nameOfXmlRenderingProvider = string.Empty;
            foreach (XmlNode nodeLoopVariable in nodes.SelectSingleNode(Portable.SettingsElement).ChildNodes)
            {
                node = nodeLoopVariable;
                var settingName = node.Attributes[Portable.NameAttribute].Value;
                var settingValue = node.Attributes[Portable.ValueAttribute].Value;
                objModules.UpdateModuleSetting(moduleId, settingName, settingValue);
                if (settingName == Setting.SourceProvider)
                    nameOfXmlDataProvider = settingValue;
                if (settingName == Setting.RenderingProvider)
                    nameOfXmlRenderingProvider = settingValue;
            }

            XmlDataProvider.Instance(nameOfXmlDataProvider).ImportProviderSettings(moduleId, nodes.SelectSingleNode("XmlDataProvider"));
            XmlRenderingProvider.Instance(nameOfXmlRenderingProvider).ImportProviderSettings(moduleId, nodes.SelectSingleNode("XmlRenderingProvider"));

            //LEGACY SUPPORT
            XmlDataProvider.Instance("HttpRequestProvider").ImportProviderSettings(moduleId, nodes.SelectSingleNode("URL"));
            XmlRenderingProvider.Instance("XslCompiledTransformProvider").ImportProviderSettings(moduleId, nodes.SelectSingleNode("XSL"));

        }
コード例 #2
0
        public void Load(int moduleId)
        {
            ModuleController modCtrl = new ModuleController();
            Hashtable modSettings = modCtrl.GetModuleSettings(moduleId);

            ModuleId = moduleId;

            if (modSettings.ContainsKey("template")) {
                Template = modSettings["template"].ToString();
            }

            if (Template.IndexOf("/") == -1) {
                Template = "LightBox/" + Template;
            }

            TemplateType = Template.Substring(0, Template.IndexOf("/"));

            if (modSettings.ContainsKey("thumb_width")) {
                try {
                    ThumbWidth = Convert.ToInt32(modSettings["thumb_width"]);
                } catch {
                    ThumbWidth = 0;
                }
            }

            if (modSettings.ContainsKey("thumb_height")) {
                try {
                    ThumbHeight = Convert.ToInt32(modSettings["thumb_height"]);
                } catch {
                    ThumbHeight = 0;
                }
            }
        }
コード例 #3
0
        public override void UpdateSettings()
        {
            try
            {
                ModuleController controller = new ModuleController();
                controller.UpdateTabModuleSetting(TabModuleId, "TokenProvider", ddlTokens.SelectedValue);
                foreach (TokenConfigurator conf in phConfigurator.Controls)
                {
                    var sets = conf.SaveSettings();
                    foreach (DictionaryEntry set in sets)
                    {
                        controller.UpdateTabModuleSetting(TabModuleId, (string)set.Key, (string)set.Value);
                    }
                    if (conf.Visible)
                    {
                        controller.UpdateTabModuleSetting(TabModuleId, "Token", conf.getToken());

                    }
                }
            }
            catch (Exception exc) // Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
コード例 #4
0
        public HttpResponseMessage GetModuleShareable(int moduleId, int tabId, int portalId = -1)
        {
            var requiresWarning = false;
            if (portalId == -1)
            {
                var portalDict = PortalController.GetPortalDictionary();
                portalId = portalDict[tabId];
            }

            DesktopModuleInfo desktopModule;
            if (tabId < 0)
            {
                desktopModule = DesktopModuleController.GetDesktopModule(moduleId, portalId);
            }
            else
            {
                var moduleInfo = new ModuleController().GetModule(moduleId, tabId);

                desktopModule = moduleInfo.DesktopModule;

                requiresWarning = moduleInfo.PortalID != PortalSettings.PortalId && desktopModule.Shareable == ModuleSharing.Unknown;
            }

            if (desktopModule == null)
            {
                var message = string.Format("Cannot find module ID {0} (tab ID {1}, portal ID {2})", moduleId, tabId, portalId);
                Logger.Error(message);
                return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, message);
            }

            return Request.CreateResponse(HttpStatusCode.OK, new {Shareable = desktopModule.Shareable.ToString(), RequiresWarning = requiresWarning});
        }
コード例 #5
0
    public override void LoadSettings()
    {
        base.LoadSettings();


        DotNetNuke.Entities.Modules.ModuleController objModulesHome = new DotNetNuke.Entities.Modules.ModuleController();
        string tabHOMEid = "" + objModulesHome.GetModuleSettings(ModuleId)["HomeMobile"];

        List <TabInfo> tabs = TabController.GetPortalTabs(PortalController.GetCurrentPortalSettings().PortalId, 0, false, true);


        DropList1.Items.Clear();
        foreach (TabInfo tab in tabs)
        {
            DropList1.Items.Add(new ListItem(tab.TabName, "" + tab.TabID));
        }
        for (int i = 0; i < DropList1.Items.Count; i++)
        {
            if (DropList1.Items[i].Value.Equals("" + tabHOMEid))
            {
                DropList1.SelectedIndex = i;
                break;
            }
        }
    }
コード例 #6
0
ファイル: Setup.ascx.cs プロジェクト: biganth/Curt
        public void btGo_Click(object sender, EventArgs e)
        {
            //Setup Child Page - Main View/Activity
            TabInfo tab = CreatePage(PortalSettings.ActiveTab, PortalId, TabId, "Group Activity", false);
            //Add Module to Child Page
            int groupViewModuleId = AddModule(tab, PortalId, "Social Groups", "ContentPaneProfile");
            int journalModuleId = AddModule(tab, PortalId, "Journal", "ContentPaneProfile");
            int consoleId = AddModule(tab, PortalId, "Console", "RightPaneProfile");

            var mc = new ModuleController();

            ModuleInfo groupConsoleModule = mc.GetModule(consoleId, tab.TabID);
            TabInfo memberTab = CreatePage(PortalSettings.ActiveTab, PortalId, tab.TabID, "Members", false);
            mc.CopyModule(groupConsoleModule, memberTab, "RightPaneProfile", true);

            ModuleInfo groupViewModule = mc.GetModule(groupViewModuleId, tab.TabID);
            mc.CopyModule(groupViewModule, memberTab, "ContentPaneProfile", true);
            AddModule(memberTab, PortalId, "DotNetNuke.Modules.MemberDirectory", "ContentPaneProfile");


            //List Settings
            var modules = new ModuleController();
            modules.UpdateTabModuleSetting(TabModuleId, Constants.GroupLoadView, GroupMode.List.ToString());
            modules.UpdateTabModuleSetting(TabModuleId, Constants.GroupViewPage, tab.TabID.ToString(CultureInfo.InvariantCulture));

            Response.Redirect(Request.RawUrl);
        }
コード例 #7
0
ファイル: Settings.ascx.cs プロジェクト: maelAIS/RODI
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack)
        {
            return;
        }

        DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();
        int tabid = 0;

        int.TryParse("" + objModules.GetModuleSettings(ModuleId)["Presentationtabid"], out tabid);
        Tab.DataTextField  = "Text";
        Tab.DataValueField = "Value";
        Tab.DataSource     = Functions.GetListItemsFromTabs(tabid);
        Tab.DataBind();
        Tab.SelectedValue = tabid.ToString();

        DotNetNuke.Entities.Modules.ModuleController objModules2 = new DotNetNuke.Entities.Modules.ModuleController();
        int tabDon = 0;

        int.TryParse("" + objModules2.GetModuleSettings(ModuleId)["Dontabid"], out tabDon);
        Tab_Don.DataTextField  = "Text";
        Tab_Don.DataValueField = "Value";
        Tab_Don.DataSource     = Functions.GetListItemsFromTabs(tabDon);
        Tab_Don.DataBind();
        Tab_Don.SelectedValue = tabDon.ToString();
    }
コード例 #8
0
        public Configuration(int ModuleId)
        {
            _ModuleId       = ModuleId;
            _portalSettings = PortalController.GetCurrentPortalSettings();
            _TabID          = _portalSettings.ActiveTab.TabID;
            var mc = new DotNetNuke.Entities.Modules.ModuleController();

            _ModuleConfiguration = mc.GetModule(_ModuleId, _TabID);
            _TabModuleID         = _ModuleConfiguration.TabModuleID;

            Hashtable tabModuleSettings = mc.GetTabModuleSettings(_TabModuleID);
            Hashtable moduleSettings    = mc.GetModuleSettings(_ModuleId);

            //Merge the TabModuleSettings and ModuleSettings
            _Settings = new Hashtable();
            foreach (string strKey in tabModuleSettings.Keys)
            {
                _Settings[strKey] = tabModuleSettings[strKey];
            }
            foreach (string strKey in moduleSettings.Keys)
            {
                _Settings[strKey] = moduleSettings[strKey];
            }

            LoadSettings();
        }
コード例 #9
0
        public static void AddAdminPages(string tabName, string description, string tabIconFile, string tabIconFileLarge, bool isVisible, int moduleDefId, string moduleTitle, string moduleIconFile, bool inheritPermissions)
        {
            var portalController = new PortalController();
            ArrayList portals = portalController.GetPortals();

            //Add Page to Admin Menu of all configured Portals
            for (int intPortal = 0; intPortal <= portals.Count - 1; intPortal++)
            {
                var portal = (PortalInfo)portals[intPortal];

                //Create New Admin Page (or get existing one)
                TabInfo newPage = Upgrade.AddAdminPage(portal, tabName, description, tabIconFile, tabIconFileLarge, isVisible);

                //Add Module To Page
                Upgrade.AddModuleToPage(newPage, moduleDefId, moduleTitle, moduleIconFile, inheritPermissions);
                var moduleController = new ModuleController();

                if (newPage != null) {
                    foreach (var module in moduleController.GetTabModules(newPage.TabID).Values)
                    {
                        moduleController.UpdateTabModuleSetting(module.TabModuleID, "hideadminborder", "true");
                    }
                }

            }
        }
コード例 #10
0
        public Settings(int moduleId, int tabModuleId)
        {
            _moduleId = moduleId;
            _tabModuleId = tabModuleId;

            var mc = new ModuleController();
            ModuleSettings = mc.GetModuleSettings(_moduleId);
            TabModuleSettings = mc.GetTabModuleSettings(_tabModuleId);

            History = TabModuleSettings.GetInteger(SettingName.History, _History);
            DescriptionLength = TabModuleSettings.GetInteger(SettingName.DescriptionLength, _DescriptionLength);
            EditorHeight = TabModuleSettings.GetInteger(SettingName.EditorHeight, _EditorHeight);
            RepeatTemplate = TabModuleSettings.GetInteger(SettingName.RepeatTemplate, _defaultRepeatTemplate);
            DefaultViewType = Utilities.StringToViewType(TabModuleSettings.GetString(SettingName.DefaultViewType, _DefaultViewType));
            TemplateType = TabModuleSettings.GetString(SettingName.TemplateType, _TemplateType);
            TemplateName = TabModuleSettings.GetString(SettingName.TemplateName, _TemplateName);
            TemplateLocation = TabModuleSettings.GetString(SettingName.TemplateLocation, _TemplateLocation);
            
            
            //legacy
            ItemTemplate = TabModuleSettings.GetString(SettingName.ItemTemplate, Null.NullString);
            AltItemTemplate = TabModuleSettings.GetString(SettingName.AltItemTemplate, Null.NullString);
            Separator = TabModuleSettings.GetString(SettingName.HeaderTemplate, Null.NullString);
            HeaderTemplate = TabModuleSettings.GetString(SettingName.HeaderTemplate, Null.NullString);
            FooterTemplate = TabModuleSettings.GetString(SettingName.FooterTemplate, Null.NullString);
            RepeatTemplate = TabModuleSettings.GetInteger(SettingName.FooterTemplate, 0);

            Legacy = ModuleSettings.GetBoolean(SettingName.Legacy, _Legacy) || !Legacy && !string.IsNullOrEmpty(ItemTemplate);
        }
コード例 #11
0
        /// <summary>UpdateSettings saves the modified settings to the Database</summary>
        public override void UpdateSettings()
        {
            try
            {
                if (!this.Page.IsValid)
                {
                    return;
                }

                var modules = new ModuleController();
                modules.UpdateModuleSetting(this.ModuleId, "SiteUrl", this.SiteUrlTextBox.Text);
                modules.UpdateModuleSetting(this.ModuleId, "ShowMessage", this.ShowMessageCheckBox.Checked.ToString(CultureInfo.InvariantCulture));
                modules.UpdateModuleSetting(this.ModuleId, "ShowModal", this.ShowModalCheckBox.Checked.ToString(CultureInfo.InvariantCulture));
                modules.UpdateModuleSetting(this.ModuleId, "CarbonCopy", this.CarbonCopyTextBox.Text);
                modules.UpdateModuleSetting(this.ModuleId, "BlindCarbonCopy", this.BlindCarbonCopyTextBox.Text);
                modules.UpdateModuleSetting(this.ModuleId, "From", this.FromTextBox.Text);
                modules.UpdateModuleSetting(this.ModuleId, "Subject", this.SubjectTextBox.Text);
                modules.UpdateModuleSetting(this.ModuleId, "Body", this.BodyTextBox.Text);
                modules.UpdateModuleSetting(this.ModuleId, "InvisibleCaptcha", this.InvisibleCaptchaCheckBox.Checked.ToString(CultureInfo.InvariantCulture));
                modules.UpdateModuleSetting(this.ModuleId, "TimedCaptcha", this.TimedCaptchaCheckBox.Checked.ToString(CultureInfo.InvariantCulture));
                modules.UpdateModuleSetting(this.ModuleId, "StandardCaptcha", this.StandardCaptchaCheckBox.Checked.ToString(CultureInfo.InvariantCulture));
            }
            catch (Exception exc)
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
コード例 #12
0
        protected void Page_Load( Object sender, EventArgs e )
        {
            try
            {
                if( Request.QueryString["moduleid"] != null )
                {
                    m_moduleId = int.Parse( Request.QueryString["moduleid"] );
                }

                ModuleController objModules = new ModuleController();
                ModuleInfo objModule = objModules.GetModule(ModuleId, TabId, false);
                if( objModule != null )
                {
                    ArrayList arrFiles = Globals.GetFileList( PortalId, "xml", false );
                    foreach( FileItem objFile in arrFiles )
                    {
                        if( objFile.Text.IndexOf( "content." + CleanName( objModule.FriendlyName ) ) != - 1 )
                        {
                            cboFiles.Items.Add( objFile.Text );
                        }
                    }
                }
            }
            catch( Exception exc ) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException( this, exc );
            }
        }
コード例 #13
0
        public HttpResponseMessage GetAllAnnouncements(string output)
        {
            try
            {
                var mc = new ModuleController();
                var results = new List<AnnouncementInfo>();
                // get list of all announcements modules in the site
                var annModules = mc.GetModulesByDefinition(PortalSettings.PortalId, "Announcements");
                // loop through all the modules
                foreach (ModuleInfo m in annModules )
                {
                   // make sure to only include modules the user actually has access to
                   if (ModulePermissionController.HasModuleAccess(SecurityAccessLevel.View, "VIEW", m))
                   {
                       // get the current announcements of the module
                       IEnumerable<Components.Business.AnnouncementInfo> baseResults = new Components.Business.AnnouncementsController().GetCurrentAnnouncements(m.ModuleID);
                       // add to the total results list
                       results.AddRange(baseResults.Select(announcementInfo => new AnnouncementInfo(announcementInfo)).ToList());
                   }  
                }

                return GenerateOutput(results.OrderByDescending(a => a.PublishDate).ToList(), output);
            }
            catch (Exception ex)
            {
                DnnLog.Error(ex);
                return Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message);
            }

        }
コード例 #14
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// LoadSettings loads the settings from the Database and displays them
        /// </summary>
        /// -----------------------------------------------------------------------------
        public override void LoadSettings()
        {
            try
            {
                if (Page.IsPostBack == false)
                {
                    var module = new ModuleController();

                    if (TabModuleSettings.Contains(SettingNames.JumbotronTitle))
                        txtJumbotronTitle.Text = TabModuleSettings[SettingNames.JumbotronTitle].ToString();

                    if (TabModuleSettings.Contains(SettingNames.SubmitPhoneButton))
                        txtCallToActionPhone.Text = TabModuleSettings[SettingNames.SubmitPhoneButton].ToString();

                    txtSelectedCountries.Text = (TabModuleSettings[SettingNames.SelectedCountries] ?? SettingNames.DefaultCountries).ToString();

                    txtServiceOnSubmit.Text = (TabModuleSettings[SettingNames.ServiceOnSubmit] ?? string.Empty).ToString();

                    htmlEditor.Text = module.ReadLargeTabModuleSetting(TabModuleSettings, TabModuleId, SettingNames.JumbotronContent);
                }
            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
コード例 #15
0
ファイル: Toast.ascx.cs プロジェクト: heitkea/DNN_DEV_7_2
        //This method is copied from user skin object
        private int FindMessageTab()
        {
            var tabController = new TabController();
            var moduleController = new ModuleController();

            //On brand new install the new Message Center Module is on the child page of User Profile Page 
            //On Upgrade to 6.2.0, the Message Center module is on the User Profile Page
            var profileTab = tabController.GetTab(PortalSettings.UserTabId, PortalSettings.PortalId, false);
            if (profileTab != null)
            {
                var childTabs = tabController.GetTabsByPortal(profileTab.PortalID).DescendentsOf(profileTab.TabID);
                foreach (TabInfo tab in childTabs)
                {
                    foreach (KeyValuePair<int, ModuleInfo> kvp in moduleController.GetTabModules(tab.TabID))
                    {
                        var module = kvp.Value;
                        if (module.DesktopModule.FriendlyName == "Message Center")
                        {
                            return tab.TabID;                            
                        }
                    }
                }
            }

            //default to User Profile Page
            return PortalSettings.UserTabId;            
        }        
コード例 #16
0
ファイル: Settings.ascx.cs プロジェクト: maelAIS/RODI
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack)
        {
            return;
        }

        DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();
        int tabid = 0;

        int.TryParse("" + objModules.GetModuleSettings(ModuleId)["tabid"], out tabid);

        int nbnews = 0;

        int.TryParse("" + objModules.GetModuleSettings(ModuleId)["nbnews"], out nbnews);
        TXT_NB_News.Text = "" + nbnews;

        Tab.DataTextField  = "Text";
        Tab.DataValueField = "Value";
        Tab.DataSource     = Functions.GetListItemsFromTabs(tabid);
        Tab.DataBind();
        Tab.SelectedValue = "" + tabid;

        RB_Categorie.SelectedValue = "" + objModules.GetModuleSettings(ModuleId)["category"];

        TXT_Tags_Inclus.Text = "" + objModules.GetModuleSettings(ModuleId)["tags_included"];
        TXT_Tags_Exclus.Text = "" + objModules.GetModuleSettings(ModuleId)["tags_excluded"];
    }
コード例 #17
0
        public bool Save(ModuleController moduleController, int moduleId)
        {
            try
            {
                if (moduleController == null || moduleId < 0)
                    return false;

                moduleController.UpdateModuleSetting(moduleId, ForumsSettingsKey, Forums);
                moduleController.UpdateModuleSetting(moduleId, RowsSettingsKey, Rows.ToString());
                moduleController.UpdateModuleSetting(moduleId, FormatSettingsKey, Format);
                moduleController.UpdateModuleSetting(moduleId, HeaderSettingsKey, Header);
                moduleController.UpdateModuleSetting(moduleId, FooterSettingsKey, Footer);
                moduleController.UpdateModuleSetting(moduleId, RSSEnabledSettingsKey, RSSEnabled.ToString());
                moduleController.UpdateModuleSetting(moduleId, TopicsOnlySettingsKey, TopicsOnly.ToString());
                moduleController.UpdateModuleSetting(moduleId, RandomOrderSettingsKey, RandomOrder.ToString());
                moduleController.UpdateModuleSetting(moduleId, TagsSettingsKey, Tags);
                moduleController.UpdateModuleSetting(moduleId, RSSIgnoreSecuritySettingsKey, RSSIgnoreSecurity.ToString());
                moduleController.UpdateModuleSetting(moduleId, RSSIncludeBodySettingsKey, RSSIncludeBody.ToString());
                moduleController.UpdateModuleSetting(moduleId, RSSCacheTimeoutSettingsKey, RSSCacheTimeout.ToString());

                // Clear the cache
                DataCache.CacheClear("aftp_" + moduleId);

                return true;
            }
            catch (Exception)
            {
                return false;
            }
        }
コード例 #18
0
ファイル: DnnStuffToRefactor.cs プロジェクト: 2sic/2sxc
        /// <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);
            }
        }
コード例 #19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack)
        {
            return;
        }

        DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();

        int tabid_Presentation = 0;

        int.TryParse("" + objModules.GetModuleSettings(ModuleId)["presentationtabid"], out tabid_Presentation);
        Tab_presentation.DataTextField  = "Text";
        Tab_presentation.DataValueField = "Value";
        Tab_presentation.DataSource     = Functions.GetListItemsFromTabs(tabid_Presentation);
        Tab_presentation.DataBind();
        Tab_presentation.SelectedValue = tabid_Presentation.ToString();

        string valueRBL = "" + objModules.GetModuleSettings(ModuleId)["mode"];

        foreach (ListItem li in rbl_mode.Items)
        {
            if (li.Value == valueRBL)
            {
                li.Selected = true;
            }
        }
    }
コード例 #20
0
        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);
            }
        }
コード例 #21
0
    public override void UpdateSettings()
    {
        base.UpdateSettings();

        DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();
        objModules.UpdateModuleSetting(ModuleId, "PresentationEdittabid", Tab.SelectedValue);
    }
コード例 #22
0
    public override void UpdateSettings()
    {
        base.UpdateSettings();

        DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();
        objModules.UpdateModuleSetting(ModuleId, "admin", rbl_admin.SelectedValue);
    }
コード例 #23
0
ファイル: RecycleBin.ascx.cs プロジェクト: rickfox/Steves
        /// <summary>
        /// Permanently removes all deleted tabs and modules
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <remarks>
        /// Parent tabs will not be deleted. To delete a parent tab all child tabs need to be deleted before.
        /// </remarks>
        /// <history>
        /// 	[VMasanas]	18/08/2004	Created
        /// </history>
        protected void OnEmptyBinClick(Object sender, EventArgs e)
        {
            var objEventLog = new EventLogController();

            foreach (ListItem item in lstModules.Items)
            {
                var objModules = new ModuleController();
                var values = item.Value.Split('-');
                var tabId = int.Parse(values[0]);
                var moduleId = int.Parse(values[1]);

                //delete module
                var objModule = objModules.GetModule(moduleId, tabId, false);
                if (objModule != null)
                {
                    //hard-delete Tab Module Instance
                    objModules.DeleteTabModule(tabId, moduleId, false);
                    objEventLog.AddLog(objModule, PortalSettings, UserId, "", EventLogController.EventLogType.MODULE_DELETED);
                }
            }
            foreach (ListItem item in lstTabs.Items)
            {
                var intTabId = int.Parse(item.Value);
                var objTabs = new TabController();
                var objTab = objTabs.GetTab(intTabId, PortalId, false);
                if (objTab != null)
                {
                    DeleteTab(objTab, true);
                }
            }
            BindData();
        }
コード例 #24
0
        /// <summary>
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    IInviteRepository _repository = new InviteRepository();
                    _invitations = _repository.GetUserInvites(UserId, DateTime.MinValue).ToList();

                    DotNetNuke.Entities.Tabs.TabController tCtrl = new DotNetNuke.Entities.Tabs.TabController();
                    var activityTab = tCtrl.GetTabByName("Activity Feed", PortalId, -1);
                    if (activityTab != null)
                    {
                        UserProfileTabId = activityTab.TabID;
                    }

                    var mCtrl = new DotNetNuke.Entities.Modules.ModuleController();
                    ModuleName = mCtrl.GetModule(base.ModuleId).DesktopModule.ModuleName;
                }
                DotNetNuke.Framework.ServicesFramework.Instance.RequestAjaxScriptSupport();
                DotNetNuke.Framework.ServicesFramework.Instance.RequestAjaxAntiForgerySupport();
            }
            catch (Exception exc) //Module failed to load
            {
                DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
コード例 #25
0
        /// <summary>
        ///   IPortable: Export
        /// </summary>
        public string ExportModule(int moduleId)
        {
            var settings = new ModuleController().GetModuleSettings(moduleId);
            //start export
            var strXml = new StringWriter();
            XmlWriter writer = new XmlTextWriter(strXml);
            writer.WriteStartElement(Portable.ModuleElement);
            writer.WriteStartElement(Portable.SettingsElement);

            foreach (DictionaryEntry item in settings)
            {
                writer.WriteStartElement(Portable.SettingElement);
                writer.WriteAttributeString(Portable.NameAttribute, Convert.ToString(item.Key));
                writer.WriteAttributeString(Portable.ValueAttribute, Convert.ToString(item.Value));
                writer.WriteEndElement();
            }
            writer.WriteEndElement();
            writer.WriteStartElement("XmlDataProvider");
            var nameOfSourceProvider = settings[Setting.SourceProvider].ToString();
            writer.WriteAttributeString(Portable.NameAttribute, nameOfSourceProvider);
            XmlDataProvider.Instance(nameOfSourceProvider).ExportProviderSettings(moduleId, writer);
            writer.WriteEndElement();
            writer.WriteStartElement("XmlRenderingProvider");
            var nameOfRenderingProvider = settings[Setting.RenderingProvider].ToString();
            writer.WriteAttributeString(Portable.NameAttribute, nameOfRenderingProvider);
            XmlRenderingProvider.Instance(nameOfRenderingProvider).ExportProviderSettings(moduleId, writer);
            writer.WriteEndElement();
            writer.WriteEndElement();
            writer.Close();

            return strXml.ToString();
        }
コード例 #26
0
        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");
            }
        }
コード例 #27
0
        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);
            }
        }
コード例 #28
0
ファイル: Settings.ascx.cs プロジェクト: maelAIS/RODI
    /// <summary>
    /// Met à jour les données grâce aux informations entrées au préalable
    /// </summary>
    public override void UpdateSettings()
    {
        base.UpdateSettings();

        DotNetNuke.Entities.Modules.ModuleController objModules3 = new DotNetNuke.Entities.Modules.ModuleController();
        objModules3.UpdateModuleSetting(ModuleId, "clubtabid", Tab_club.SelectedValue);
    }
コード例 #29
0
ファイル: DnnUtils.cs プロジェクト: robsiera/NBrightDNN
        public static ModuleInfo GetModuleinfo(int moduleId)
        {
            var objMCtrl = new DotNetNuke.Entities.Modules.ModuleController();
            var objMInfo = objMCtrl.GetModule(moduleId);

            return(objMInfo);
        }
コード例 #30
0
        private void SearchExecute()
        {
            int ResultsTabid;

            if( Settings["SearchResultsModule"] != null )
            {
                ResultsTabid = int.Parse( Convert.ToString( Settings["SearchResultsModule"] ) );
            }
            else
            {
                //Get Default Page
                ModuleController objModules = new ModuleController();
                ModuleInfo SearchModule = objModules.GetModuleByDefinition( PortalSettings.PortalId, "Search Results" );
                if( SearchModule == null )
                {
                    UI.Skins.Skin.AddModuleMessage( this, Localization.GetString( "NoSearchModule", LocalResourceFile ), ModuleMessageType.YellowWarning );
                    return;
                }
                else
                {
                    ResultsTabid = SearchModule.TabID;
                }
            }
            if( HostSettings.GetHostSetting( "UseFriendlyUrls" ) == "Y" )
            {
                Response.Redirect( Globals.NavigateURL( ResultsTabid ) + "?Search=" + Server.UrlEncode( txtSearch.Text ) );
            }
            else
            {
                Response.Redirect( Globals.NavigateURL( ResultsTabid ) + "&Search=" + Server.UrlEncode( txtSearch.Text ) );
            }
        }
コード例 #31
0
        void EditUserLink_Load(object sender, EventArgs e)
        {
            //we need to initialize once only
            if (!Page.IsPostBack)
            {
                if (IsNotAListOfValues)
                {
                    var mc = new ModuleController();
                    var settings = mc.GetModuleSettings(ModuleId);
                    var showInNewWindow = settings[SettingName.URLNewWindow].AsBoolean();
                    //The following code must be executed during load, because the URLcontrol uses the viewstate
                    CtlUrl.UrlType = "M";
                    CtlUrl.ShowUsers = true;
                    CtlUrl.ShowFiles = false;
                    CtlUrl.ShowTabs = false;
                    CtlUrl.ShowUrls = false;
                    CtlUrl.ShowUpLoad = false;
                    CtlUrl.ShowLog = false;
                    CtlUrl.ShowTrack = false;
                    CtlUrl.Required = Required;
                    CtlUrl.ShowNewWindow = showInNewWindow;
                }

                if (!ValueIsSet && DefaultValue.Length > 0)
                {
                    var user = UserController.GetUserByName(PortalId, DefaultValue);
                    if (user == null && Information.IsNumeric(DefaultValue)) //check for valid userID:
                    {
                        user = new UserController().GetUser(PortalId, int.Parse(DefaultValue));
                    }
                    
                    Value = string.Format("UserId={0}", user.UserID);
                }
            }
        }
コード例 #32
0
ファイル: SecurityContext.cs プロジェクト: BravoSierra/2sxc
        public static ModuleInfo getModuleInfo(int moduleId, int tabId)
        {
            var modController = new ModuleController();
            var modInfo = modController.GetModule(moduleId, tabId);
            return modInfo;

        }
コード例 #33
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!Page.IsPostBack)
            {
                try
                {
                    var moduleController = new ModuleController();

                    lblJumbotronTitle.Text = (TabModuleSettings[SettingNames.JumbotronTitle] ?? LocalizeString("JumbotronDefaultTitle")).ToString();

                    litJumbotronContent.Text = moduleController.ReadLargeTabModuleSetting(TabModuleSettings, TabModuleId, SettingNames.JumbotronContent) ?? string.Empty;

                    btnSubmitPhone.Text = (TabModuleSettings[SettingNames.SubmitPhoneButton] ?? LocalizeString("SubmitForm")).ToString();

                    SelectedCountries = (TabModuleSettings[SettingNames.SelectedCountries] ?? SettingNames.DefaultCountries).ToString();

                    //Set cookies if viral metadata is specified
                    if (!string.IsNullOrWhiteSpace(GetQueryStringParameter("referal")))
                        base.Referal = GetQueryStringParameter("referal");

                    if (!string.IsNullOrWhiteSpace(GetQueryStringParameter("viral")))
                        base.ViralToken = GetQueryStringParameter("viral");
                }
                catch (Exception exc) //Module failed to load
                {
                    Exceptions.ProcessModuleLoadException(this, exc);
                }
            }
        }
コード例 #34
0
    protected void LoadSettings()
    {
        ModuleController objModules = new ModuleController();

        //OBSOLETE
        //objModules.GetModuleSettings(ModuleId);
        //Hashtable hash = objModules.GetModuleSettings(ModuleId);

        //NEW
        //ModuleConfiguration.ModuleSettings["SQLTemplate"].ToString();

        if (ModuleConfiguration.ModuleSettings["SQLTemplate"] != null)
        {
            txtTemplate.Text = ModuleConfiguration.ModuleSettings["SQLTemplate"].ToString();
        }

        if (ModuleConfiguration.ModuleSettings["SQLItemTemplate"] != null)
        {
            txtItemTemplate.Text = ModuleConfiguration.ModuleSettings["SQLItemTemplate"].ToString();
        }

        if (ModuleConfiguration.ModuleSettings["SQLRowTemplate"] != null)
        {
            txtRowTemplate.Text = ModuleConfiguration.ModuleSettings["SQLRowTemplate"].ToString();
        }

        if (ModuleConfiguration.ModuleSettings["SQLQuery"] != null)
        {
            txtSqlQuery.Text = ModuleConfiguration.ModuleSettings["SQLQuery"].ToString();
        }
    }
コード例 #35
0
        public static string BuildEditUrl(int itemId, int tabId, int moduleId)
        {
            int id = Convert.ToInt32(itemId, CultureInfo.InvariantCulture);
            int typeId = Item.GetItemTypeId(id);
            ItemType type = ItemType.GetFromId(typeId, typeof(ItemType));
            Item i;
            var controller = new ModuleController();
            int portalId = controller.GetModule(moduleId, tabId).PortalID;
            if (type.Name == ItemType.Article.Name)
            {
                i = Article.GetArticle(id, portalId);
            }
            else
            {
                i = Category.GetCategory(id);
            }

            string returnUrl = string.Empty;
            if (HttpContext.Current != null)
            {
                returnUrl = "returnUrl=" + HttpUtility.UrlEncode(HttpContext.Current.Request.RawUrl);
            }

            return Globals.NavigateURL(
                tabId,
                string.Empty,
                "ctl=" + Utility.AdminContainer,
                "mid=" + moduleId.ToString(CultureInfo.InvariantCulture),
                "adminType=" + type.Name + "Edit",
                "versionId=" + i.ItemVersionId.ToString(CultureInfo.InvariantCulture),
                returnUrl);
        }
コード例 #36
0
        /// <summary>
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                _settings              = new SettingsRepository(base.ModuleContext.ModuleId, base.ModuleContext.TabModuleId);
                DefaultMessage         = System.Web.HttpUtility.JavaScriptStringEncode(_settings.DefaultMessage);
                MaxEmailInputs         = _settings.MaxEmailInvitesPerSubmit;
                MaxDailyInvites        = _settings.MaxEmailInvitesPerDay;
                pnlUserMessage.Visible = _settings.ShowMessageToUser;

                if (!IsPostBack)
                {
                    DotNetNuke.Entities.Tabs.TabController tCtrl = new DotNetNuke.Entities.Tabs.TabController();
                    var activityTab = tCtrl.GetTabByName("Activity Feed", PortalId, -1);
                    if (activityTab != null)
                    {
                        UserProfileTabId = activityTab.TabID;
                    }

                    var mCtrl = new DotNetNuke.Entities.Modules.ModuleController();
                    ModuleName = mCtrl.GetModule(base.ModuleId).DesktopModule.ModuleName;

                    lnkCloseModal.Visible = IsModal;

                    IInviteRepository inviteRepo = new InviteRepository();
                    DailyInviteCount = inviteRepo.GetUserInvites(base.UserId, DateTime.Today).Count();
                }
                DotNetNuke.Framework.ServicesFramework.Instance.RequestAjaxScriptSupport();
                DotNetNuke.Framework.ServicesFramework.Instance.RequestAjaxAntiForgerySupport();
            }
            catch (Exception exc) //Module failed to load
            {
                DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
コード例 #37
0
 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;
     }
 }
コード例 #38
0
    public override void UpdateSettings()
    {
        base.UpdateSettings();

        DotNetNuke.Entities.Modules.ModuleController objModules3 = new DotNetNuke.Entities.Modules.ModuleController();
        objModules3.UpdateModuleSetting(ModuleId, "presentationtabid", Tab_presentation.SelectedValue);
        objModules3.UpdateModuleSetting(ModuleId, "mode", rbl_mode.SelectedValue);
    }
コード例 #39
0
 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);
 }
コード例 #40
0
    public override void UpdateSettings()
    {
        base.UpdateSettings();

        DotNetNuke.Entities.Modules.ModuleController objModules3 = new DotNetNuke.Entities.Modules.ModuleController();
        objModules3.UpdateModuleSetting(ModuleId, "tabid", ddl_tab.SelectedValue);
        objModules3.UpdateModuleSetting(ModuleId, "rank", tbx_rank.Text);
    }
コード例 #41
0
 private void ClearModuleSettings(ModuleInfo objModule)
 {
     var moduleController = new ModuleController();
     if (objModule.ModuleDefinition.FriendlyName == "Text/HTML")
     {
         moduleController.DeleteModuleSetting(objModule.ModuleID, "WorkFlowID");
     }
 }
コード例 #42
0
        public override void UpdateSettings()
        {
            base.UpdateSettings();

            //
            ModuleController mc = new ModuleController();
            mc.UpdateModuleSetting(ModuleId, "WidthSlide", txtWidth.Text);
            mc.UpdateModuleSetting(ModuleId, "HeightSlide", txtHeight.Text);
        }
コード例 #43
0
        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);
        }
コード例 #44
0
 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() + "/", ""));
 }
コード例 #45
0
    public override void UpdateSettings()
    {
        base.UpdateSettings();

        DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();

        objModules.UpdateModuleSetting(ModuleId, "style", tbx_style.Text);
        objModules.UpdateModuleSetting(ModuleId, "path", tbx_path.Text);
        objModules.UpdateModuleSetting(ModuleId, "print", tbx_print.Text);
    }
コード例 #46
0
    /// <summary>
    /// Met à jour les données grâce aux informations entrées au préalable
    /// </summary>
    public override void UpdateSettings()
    {
        base.UpdateSettings();

        DotNetNuke.Entities.Modules.ModuleController objModules3 = new DotNetNuke.Entities.Modules.ModuleController();
        DotNetNuke.Entities.Modules.ModuleController objModules4 = new DotNetNuke.Entities.Modules.ModuleController();
        objModules3.UpdateModuleSetting(ModuleId, "modules", tbx_module.Text);

        objModules4.UpdateModuleSetting(ModuleId, "roles", tbx_roles.Text);
    }
コード例 #47
0
 public Configuration(int ModuleId, Hashtable Settings)
 {
     _ModuleId       = ModuleId;
     _portalSettings = PortalController.GetCurrentPortalSettings();
     _TabID          = _portalSettings.ActiveTab.TabID;
     DotNetNuke.Entities.Modules.ModuleController mc = new DotNetNuke.Entities.Modules.ModuleController();
     _ModuleConfiguration = mc.GetModule(_ModuleId, _TabID);
     _TabModuleID         = _ModuleConfiguration.TabModuleID;
     _Settings            = Settings;
     LoadSettings();
 }
コード例 #48
0
    public override void UpdateSettings()
    {
        base.UpdateSettings();

        DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();

        if (DropList1.SelectedIndex > -1)
        {
            objModules.UpdateModuleSetting(ModuleId, "HomeMobile", DropList1.Items[DropList1.SelectedIndex].Value);
        }
    }
コード例 #49
0
ファイル: DnnUtils.cs プロジェクト: robsiera/NBrightDNN
        public static int GetPortalByModuleID(int moduleId)
        {
            var objMCtrl = new DotNetNuke.Entities.Modules.ModuleController();
            var objMInfo = objMCtrl.GetModule(moduleId);

            if (objMInfo == null)
            {
                return(-1);
            }
            return(objMInfo.PortalID);
        }
コード例 #50
0
ファイル: DnnUtils.cs プロジェクト: robsiera/NBrightDNN
        public static string GetModuleVersion(int moduleId)
        {
            var strVersion = "";
            var objMCtrl   = new DotNetNuke.Entities.Modules.ModuleController();
            var objMInfo   = objMCtrl.GetModule(moduleId);

            if (objMInfo != null)
            {
                strVersion = objMInfo.DesktopModule.Version;
            }
            return(strVersion);
        }
コード例 #51
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack)
        {
            return;
        }

        DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();
        int tabid = 0;

        int.TryParse("" + objModules.GetModuleSettings(ModuleId)["annoncetabid"], out tabid);
        Tab.DataTextField  = "Text";
        Tab.DataValueField = "Value";
        Tab.DataSource     = Functions.GetListItemsFromTabs(tabid);
        Tab.DataBind();
        Tab.SelectedValue = tabid.ToString();

        int tabid_Renouvellement = 0;

        int.TryParse("" + objModules.GetModuleSettings(ModuleId)["Payementtabid"], out tabid_Renouvellement);
        Tab_renouvellement.DataTextField  = "Text";
        Tab_renouvellement.DataValueField = "Value";
        Tab_renouvellement.DataSource     = Functions.GetListItemsFromTabs(tabid_Renouvellement);
        Tab_renouvellement.DataBind();
        Tab_renouvellement.SelectedValue = tabid_Renouvellement.ToString();

        int tabid_Presentation = 0;

        int.TryParse("" + objModules.GetModuleSettings(ModuleId)["presentationtabid"], out tabid_Presentation);
        Tab_presentation.DataTextField  = "Text";
        Tab_presentation.DataValueField = "Value";
        Tab_presentation.DataSource     = Functions.GetListItemsFromTabs(tabid_Presentation);
        Tab_presentation.DataBind();
        Tab_presentation.SelectedValue = tabid_Presentation.ToString();

        int tabid_Presentation_edit = 0;

        int.TryParse("" + objModules.GetModuleSettings(ModuleId)["presentationEdittabid"], out tabid_Presentation_edit);
        Tab_presentation_edit.DataTextField  = "Text";
        Tab_presentation_edit.DataValueField = "Value";
        Tab_presentation_edit.DataSource     = Functions.GetListItemsFromTabs(tabid_Presentation_edit);
        Tab_presentation_edit.DataBind();
        Tab_presentation_edit.SelectedValue = tabid_Presentation_edit.ToString();

        int tabid_annonce_edit = 0;

        int.TryParse("" + objModules.GetModuleSettings(ModuleId)["annonceEdittabid"], out tabid_annonce_edit);
        Tab_annonce_edit.DataTextField  = "Text";
        Tab_annonce_edit.DataValueField = "Value";
        Tab_annonce_edit.DataSource     = Functions.GetListItemsFromTabs(tabid_annonce_edit);
        Tab_annonce_edit.DataBind();
        Tab_annonce_edit.SelectedValue = tabid_annonce_edit.ToString();
    }
コード例 #52
0
    protected void Page_Load(object sender, EventArgs e)
    {
        DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();
        int annee = 0;

        int.TryParse("" + objModules.GetModuleSettings(ModuleId)["annee"], out annee);

        clubs = DataMapping.ListClubs();

        DataList1.DataSource = DataMapping.ListMembersByRotaryYearAffectation("Président", annee);
        DataList1.DataBind();
    }
コード例 #53
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack)
        {
            return;
        }

        DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();
        tbx_path.Text  = "" + objModules.GetModuleSettings(ModuleId)["path"];
        tbx_style.Text = "" + objModules.GetModuleSettings(ModuleId)["style"];
        tbx_print.Text = "" + objModules.GetModuleSettings(ModuleId)["print"];
    }
コード例 #54
0
ファイル: Settings.ascx.cs プロジェクト: maelAIS/RODI
    public override void UpdateSettings()
    {
        base.UpdateSettings();

        DotNetNuke.Entities.Modules.ModuleController objModules4 = new DotNetNuke.Entities.Modules.ModuleController();
        objModules4.UpdateModuleSetting(ModuleId, "presentationtabid", Tab_presentation_edit.SelectedValue);

        DotNetNuke.Entities.Modules.ModuleController objModules5 = new DotNetNuke.Entities.Modules.ModuleController();
        objModules5.UpdateModuleSetting(ModuleId, "annoncetabid", Tab_annonce_edit.SelectedValue);

        DotNetNuke.Entities.Modules.ModuleController objModules6 = new DotNetNuke.Entities.Modules.ModuleController();
        objModules6.UpdateModuleSetting(ModuleId, "abonnementtabid", DropDownList1.SelectedValue);
    }
コード例 #55
0
    public override void UpdateSettings()
    {
        base.UpdateSettings();

        DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();
        objModules.UpdateModuleSetting(ModuleId, "Annoncetabid", Tab.SelectedValue);

        DotNetNuke.Entities.Modules.ModuleController objModules2 = new DotNetNuke.Entities.Modules.ModuleController();
        objModules2.UpdateModuleSetting(ModuleId, "Dontabid", Tab_Don.SelectedValue);

        DotNetNuke.Entities.Modules.ModuleController objModules3 = new DotNetNuke.Entities.Modules.ModuleController();
        objModules3.UpdateModuleSetting(ModuleId, "Protabid", Tab_Pro.SelectedValue);
    }
コード例 #56
0
ファイル: Settings.ascx.cs プロジェクト: maelAIS/RODI
    public override void UpdateSettings()
    {
        base.UpdateSettings();

        DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();
        objModules.UpdateModuleSetting(ModuleId, "annoncetabid", Tab.SelectedValue);

        DotNetNuke.Entities.Modules.ModuleController objModules3 = new DotNetNuke.Entities.Modules.ModuleController();
        objModules3.UpdateModuleSetting(ModuleId, "presentationtabid", Tab_presentation.SelectedValue);

        //DotNetNuke.Entities.Modules.ModuleController objModules2 = new DotNetNuke.Entities.Modules.ModuleController();
        //objModules2.UpdateModuleSetting(ModuleId, "membretabid", DropDownList1.SelectedValue);
    }
コード例 #57
0
ファイル: Loggin_Mobile.ascx.cs プロジェクト: maelAIS/RODI
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            LogMessage("Welcome", "Welcome");

            DotNetNuke.Entities.Modules.ModuleController objModulesHome = new DotNetNuke.Entities.Modules.ModuleController();
            int.TryParse("" + objModulesHome.GetModuleSettings(ModuleId)["HomeMobile"], out tabidHome);

            string id = "" + Request["id"];
            LogMessage("Param Id", id);

            string pwd = "" + Request["pwd"];
            LogMessage("Param Pwd", pwd);


            DotNetNuke.Security.Membership.UserLoginStatus loginStatus = new DotNetNuke.Security.Membership.UserLoginStatus();
            LogMessage("LoginStatus", loginStatus.ToString());

            if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(pwd))
            {
                DotNetNuke.Entities.Users.UserInfo userInfo = DotNetNuke.Entities.Users.UserController.ValidateUser(this.PortalId, id, pwd, "", this.PortalSettings.PortalName, Request.UserHostAddress, ref loginStatus);

                if (userInfo != null)
                {
                    LogMessage("UserInfo", userInfo.UserID.ToString());
                }


                if (userInfo != null && loginStatus == DotNetNuke.Security.Membership.UserLoginStatus.LOGIN_SUCCESS)
                {
                    DotNetNuke.Entities.Users.UserController.UserLogin(this.PortalId, userInfo, this.PortalSettings.PortalName, Request.UserHostAddress, true);
                    Response.Redirect(Globals.NavigateURL(tabidHome, ""));   //refresh site
                }
                else
                {
                    //Message d'erreur et ouverture sur le site
                }
            }
            else
            {
                //Message d'erreur et ouverture sur le site
                LogMessage("PB identifiants", "Identifiant VIDE");
            }
        }
        catch (Exception ee)
        {
            AIS.Functions.Error(ee);
        }
    }
コード例 #58
0
    /// <summary>
    /// Au chargement de la page, crée les données nécessaires au paramétrage de la page principale
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack)
        {
            return;
        }
        PortalSettings portalSettings = new PortalSettings();
        int            portalId       = portalSettings.PortalId;

        DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();

        string modules = "" + objModules.GetModuleSettings(ModuleId)["modules"];

        string roles = "" + objModules.GetModuleSettings(ModuleId)["roles"];
    }
コード例 #59
0
ファイル: Settings.ascx.cs プロジェクト: maelAIS/RODI
    public override void UpdateSettings()
    {
        base.UpdateSettings();

        DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();
        objModules.UpdateModuleSetting(ModuleId, "tabid", Tab.SelectedValue);
        objModules.UpdateModuleSetting(ModuleId, "category", RB_Categorie.SelectedValue);

        int nbnews = 0;

        int.TryParse(TXT_NB_News.Text, out nbnews);
        objModules.UpdateModuleSetting(ModuleId, "nbnews", "" + nbnews);

        objModules.UpdateModuleSetting(ModuleId, "tags_included", TXT_Tags_Inclus.Text.Trim());
        objModules.UpdateModuleSetting(ModuleId, "tags_excluded", TXT_Tags_Exclus.Text.Trim());
    }
コード例 #60
0
 public void SaveSettings(int ModuleId, int TabModuleId)
 {
     _ModuleId    = ModuleId;
     _TabModuleID = TabModuleId;
     DotNetNuke.Entities.Modules.ModuleController mc = new DotNetNuke.Entities.Modules.ModuleController();
     mc.UpdateTabModuleSetting(TabModuleId, "SelectBy", _SelectBy.ToString());
     mc.UpdateTabModuleSetting(TabModuleId, "MultipleHandling", _MultipleHandling.ToString());
     mc.UpdateModuleSetting(ModuleId, "Interval", _Interval.ToString());
     mc.UpdateModuleSetting(ModuleId, "EnableUserTimeConversion", _EnableUserTimeConversion.ToString());
     mc.UpdateTabModuleSetting(TabModuleId, "CategoryID", _CategoryID.ToString());
     mc.UpdateTabModuleSetting(TabModuleId, "ProfilePropertyName", _ProfilePropertyName);
     mc.UpdateTabModuleSetting(TabModuleId, "IncludeDisabled", _IncludeDisabled.ToString());
     mc.UpdateTabModuleSetting(TabModuleId, "HideWhenNoContent", _HideWhenNoContent.ToString());
     mc.UpdateTabModuleSetting(TabModuleId, "ReplaceTitle", _ReplaceTitle.ToString());
     mc.UpdateTabModuleSetting(TabModuleId, "ReplaceTokens", _ReplaceTokens.ToString());
     DataCache.RemoveCache(string.Format(Consts.ConfigurationCacheKey, TabModuleId)); //Invalidate the tab modules's configuration cache
 }