/// -----------------------------------------------------------------------------
        /// <summary>
        /// LoadSettings loads the settings from the Database and displays them
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        /// </history>
        /// -----------------------------------------------------------------------------
        public override void LoadSettings()
        {
            try
            {
                if (Page.IsPostBack == false)
                {
                    rbSortBy.Items.Add(new ListItem(Localization.GetString("SortByDisplayName", LocalResourceFile), "DisplayName"));
                    rbSortBy.Items.Add(new ListItem(Localization.GetString("SortByUserName", LocalResourceFile), "UserName"));
                    rbSortBy.SelectedIndex = 0;


                    if (UserInfo.IsSuperUser)
                    {
                        if (TabModuleSettings.Contains("includeHost"))
                        {
                            this.cbIncludeHostUser.Checked = bool.Parse(System.Convert.ToString(TabModuleSettings["includeHost"].ToString()));
                        }
                    }
                    else
                    {
                        trHostSettings.Visible = false;
                    }
                    if (TabModuleSettings.Contains("useAjax"))
                    {
                        this.cbUseAjax.Checked = bool.Parse(System.Convert.ToString(TabModuleSettings["useAjax"].ToString()));
                    }
                    else
                    {
                        this.cbUseAjax.Checked = true;
                    }

                    if (TabModuleSettings.Contains("sortBy"))
                    {
                        rbSortBy.SelectedValue = System.Convert.ToString(TabModuleSettings["sortBy"].ToString());
                    }
                }
            }
            catch (Exception exc)             //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
Beispiel #2
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// LoadSettings loads the settings from the Database and displays them
        /// </summary>
        /// -----------------------------------------------------------------------------
        public override void LoadSettings()
        {
            try
            {
                if (Page.IsPostBack == false)
                {
                    //Check for existing settings and use those on this page
                    //Settings["SettingName"]

                    if (TabModuleSettings.Contains(SETTING_SHOW_HELP))
                    {
                        cbShowHelp.Checked = Convert.ToBoolean(TabModuleSettings[SETTING_SHOW_HELP]);
                    }
                    else
                    {
                        cbShowHelp.Checked = true;
                    }
                }
            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }