コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AjaxPro.Utility.RegisterTypeForAjax(this.GetType());

            _studioViewSettings = SettingsManager.Instance.LoadSettings<StudioViewSettings>(TenantProvider.CurrentTenantID);
            _currentTenant = CoreContext.TenantManager.GetCurrentTenant();

            _studioViewSettingsHolder.Visible = SetupInfo.IsVisibleSettings("ViewSettings");

            //main domain settings
            _mailDomainSettings.Controls.Add(LoadControl(MailDomainSettings.Location));

            //Portal version
            if (SetupInfo.IsVisibleSettings<VersionSettings.VersionSettings>())
                _portalVersionSettings.Controls.Add(LoadControl(VersionSettings.VersionSettings.Location));

            _timelngHolder.Controls.Add(LoadControl(TimeAndLanguage.Location));

            //promo settings
            if (SetupInfo.IsVisibleSettings<PromoSettings>())
                _studioNotifyBarSettingsHolder.Controls.Add(LoadControl(PromoSettings.Location));

            //strong security password settings
            _strongPasswordSettings.Controls.Add(LoadControl(PasswordSettings.Location));

            if (SetupInfo.IsVisibleSettings<AccessSettings>())
                _restrictedAccessSettings.Controls.Add(LoadControl(AccessSettings.Location));

            invLink.Controls.Add(LoadControl(InviteLink.Location));

            //sms settings
            if (SetupInfo.IsVisibleSettings<StudioSmsNotificationSettings>())
                _smsValidationSettings.Controls.Add(LoadControl(SmsValidationSettings.Location));

            _admMessSettings.Controls.Add(LoadControl(AdminMessageSettings.Location));
        }
コード例 #2
0
        public AjaxResponse SaveStudioViewSettings(bool leftSidePanel)
        {
            SecurityContext.DemandPermissions(SecutiryConstants.EditPortalSettings);

            AjaxResponse resp = new AjaxResponse();
            _studioViewSettings = SettingsManager.Instance.LoadSettings<StudioViewSettings>(TenantProvider.CurrentTenantID);
            _studioViewSettings.LeftSidePanel = leftSidePanel;
            if (SettingsManager.Instance.SaveSettings<StudioViewSettings>(_studioViewSettings, 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;
        }