Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AjaxPro.Utility.RegisterTypeForAjax(GetType());
            Page.ClientScript.RegisterClientScriptInclude(typeof(string), "firsttime1_script", WebPath.GetPath("usercontrols/Management/PromoSettings/js/PromoSettings.js"));

            _studioNotifyBarSettings = SettingsManager.Instance.LoadSettings <StudioNotifyBarSettings>(TenantProvider.CurrentTenantID);
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _visibleSidePanel  = true;
            _panelViewSettings = SettingsManager.Instance.LoadSettings <StudioViewSettings>(TenantProvider.CurrentTenantID);
            _notifyBarSettings = SettingsManager.Instance.LoadSettings <StudioNotifyBarSettings>(TenantProvider.CurrentTenantID);

            _leftSidePanel = LeftSidePanel.HasValue ? LeftSidePanel.Value : _panelViewSettings.LeftSidePanel;

            if (SecurityContext.IsAuthenticated)
            {
                AjaxPro.Utility.RegisterTypeForAjax(GetType());
                _visibleSidePanel = _panelViewSettings.VisibleSidePanel;
            }

            UserVoice = WebConfigurationManager.AppSettings["web.uservoice"] == "true";

            RegisterClientSideScript();
        }
Beispiel #3
0
        public AjaxResponse SaveNotifyBarSettings(bool showPromotions)
        {
            AjaxResponse resp = new AjaxResponse();

            _studioNotifyBarSettings = SettingsManager.Instance.LoadSettings <StudioNotifyBarSettings>(TenantProvider.CurrentTenantID);
            _studioNotifyBarSettings.ShowPromotions = showPromotions;
            if (SettingsManager.Instance.SaveSettings <StudioNotifyBarSettings>(_studioNotifyBarSettings, TenantProvider.CurrentTenantID))
            {
                resp.rs1 = "1";
                resp.rs2 = "<div class=\"okBox\">" + Resources.Resource.SuccessfullySaveSettingsMessage + "</div>";
            }
            else
            {
                resp.rs1 = "0";
                resp.rs2 = "<div class=\"errorBox\">" + Resources.Resource.UnknownError + "</div>";
            }

            return(resp);
        }