예제 #1
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            if (!IsPostBack)
            {
                BreadCrumbUser(AppManager.User.LeftMenu.UserConfiguration, "用户登录配置", AppManager.User.Permission.UserConfiguration);

                EBooleanUtils.AddListItems(rblIsRecordIP, "是", "否");
                ControlUtils.SelectListItemsIgnoreCase(rblIsRecordIP, ConfigManager.UserConfigInfo.IsRecordIp.ToString());
                EBooleanUtils.AddListItems(rblIsRecordSource, "是", "否");
                ControlUtils.SelectListItemsIgnoreCase(rblIsRecordSource, ConfigManager.UserConfigInfo.IsRecordSource.ToString());
                EBooleanUtils.AddListItems(rblIsFailToLock, "是", "否");
                ControlUtils.SelectListItemsIgnoreCase(rblIsFailToLock, ConfigManager.UserConfigInfo.IsLoginFailToLock.ToString());

                phFailToLock.Visible = false;
                if (ConfigManager.UserConfigInfo.IsLoginFailToLock)
                {
                    phFailToLock.Visible = true;
                }

                loginFailCount.Text = ConfigManager.UserConfigInfo.LoginFailToLockCount.ToString();

                ddlLockType.Items.Add(new ListItem("按小时锁定", EUserLockTypeUtils.GetValue(EUserLockType.Hours)));
                ddlLockType.Items.Add(new ListItem("永久锁定", EUserLockTypeUtils.GetValue(EUserLockType.Forever)));
                ControlUtils.SelectListItemsIgnoreCase(ddlLockType, ConfigManager.UserConfigInfo.LoginLockingType);
                lockingTime.Text = ConfigManager.UserConfigInfo.LoginLockingHours.ToString();

                phLockingTime.Visible = false;
                phLockingTime.Visible = EUserLockTypeUtils.Equals(ConfigManager.UserConfigInfo.LoginLockingType, EUserLockType.Hours);
            }
        }
예제 #2
0
 protected void ddlLoginLockingType_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (!EUserLockTypeUtils.Equals(EUserLockType.Forever, ddlLoginLockingType.SelectedValue))
     {
         phLoginLockingHours.Visible = true;
     }
     else
     {
         phLoginLockingHours.Visible = false;
     }
 }
예제 #3
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            if (IsPostBack)
            {
                return;
            }

            VerifyAdministratorPermissions(ConfigManager.Permissions.Settings.User);

            EBooleanUtils.AddListItems(RblIsRegisterAllowed);

            TbRegisterPasswordMinLength.Text = ConfigManager.SystemConfigInfo.UserPasswordMinLength.ToString();

            EUserPasswordRestrictionUtils.AddListItems(DdlRegisterPasswordRestriction);
            ControlUtils.SelectSingleItemIgnoreCase(DdlRegisterPasswordRestriction, ConfigManager.SystemConfigInfo.UserPasswordRestriction);

            EUserVerifyTypeUtils.AddListItems(DdlRegisterVerifyType);
            PhRegisterSms.Visible   = EUserVerifyTypeUtils.Equals(ConfigManager.SystemConfigInfo.UserRegistrationVerifyType, EUserVerifyType.Mobile);
            TbRegisterSmsTplId.Text = ConfigManager.SystemConfigInfo.UserRegistrationSmsTplId;

            ControlUtils.SelectSingleItemIgnoreCase(RblIsRegisterAllowed, ConfigManager.SystemConfigInfo.IsUserRegistrationAllowed.ToString());
            ControlUtils.SelectSingleItemIgnoreCase(DdlRegisterVerifyType, ConfigManager.SystemConfigInfo.UserRegistrationVerifyType);

            TbRegisterMinMinutesOfIpAddress.Text = ConfigManager.SystemConfigInfo.UserRegistrationMinMinutes.ToString();

            EBooleanUtils.AddListItems(RblIsFailToLock, "是", "否");
            ControlUtils.SelectSingleItemIgnoreCase(RblIsFailToLock, ConfigManager.SystemConfigInfo.IsUserLockLogin.ToString());

            PhFailToLock.Visible = ConfigManager.SystemConfigInfo.IsUserLockLogin;

            TbLoginFailCount.Text = ConfigManager.SystemConfigInfo.UserLockLoginCount.ToString();

            DdlLockType.Items.Add(new ListItem("按小时锁定", EUserLockTypeUtils.GetValue(EUserLockType.Hours)));
            DdlLockType.Items.Add(new ListItem("永久锁定", EUserLockTypeUtils.GetValue(EUserLockType.Forever)));
            ControlUtils.SelectSingleItemIgnoreCase(DdlLockType, ConfigManager.SystemConfigInfo.UserLockLoginType);
            TbLockingTime.Text = ConfigManager.SystemConfigInfo.UserLockLoginHours.ToString();

            PhLockingTime.Visible = false;
            PhLockingTime.Visible = EUserLockTypeUtils.Equals(ConfigManager.SystemConfigInfo.UserLockLoginType, EUserLockType.Hours);

            EBooleanUtils.AddListItems(RblIsFindPassword, "启用", "禁用");
            ControlUtils.SelectSingleItemIgnoreCase(RblIsFindPassword, ConfigManager.SystemConfigInfo.IsUserFindPassword.ToString());
            PhFindPassword.Visible      = ConfigManager.SystemConfigInfo.IsUserFindPassword;
            TbFindPasswordSmsTplId.Text = ConfigManager.SystemConfigInfo.UserFindPasswordSmsTplId;
        }
예제 #4
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }
            if (IsPostBack)
            {
                return;
            }

            VerifyAdministratorPermissions(ConfigManager.SettingsPermissions.Admin);

            TbLoginUserNameMinLength.Text = ConfigManager.SystemConfigInfo.AdminUserNameMinLength.ToString();
            TbLoginPasswordMinLength.Text = ConfigManager.SystemConfigInfo.AdminPasswordMinLength.ToString();
            EUserPasswordRestrictionUtils.AddListItems(DdlLoginPasswordRestriction);
            ControlUtils.SelectSingleItemIgnoreCase(DdlLoginPasswordRestriction, ConfigManager.SystemConfigInfo.AdminPasswordRestriction);

            EBooleanUtils.AddListItems(RblIsLoginFailToLock, "是", "否");
            ControlUtils.SelectSingleItemIgnoreCase(RblIsLoginFailToLock, ConfigManager.SystemConfigInfo.IsAdminLockLogin.ToString());

            PhFailToLock.Visible = ConfigManager.SystemConfigInfo.IsAdminLockLogin;

            TbLoginFailToLockCount.Text = ConfigManager.SystemConfigInfo.AdminLockLoginCount.ToString();

            DdlLoginLockingType.Items.Add(new ListItem("按小时锁定", EUserLockTypeUtils.GetValue(EUserLockType.Hours)));
            DdlLoginLockingType.Items.Add(new ListItem("永久锁定", EUserLockTypeUtils.GetValue(EUserLockType.Forever)));
            ControlUtils.SelectSingleItemIgnoreCase(DdlLoginLockingType, ConfigManager.SystemConfigInfo.AdminLockLoginType);

            PhLoginLockingHours.Visible = false;
            if (!EUserLockTypeUtils.Equals(ConfigManager.SystemConfigInfo.AdminLockLoginType, EUserLockType.Forever))
            {
                PhLoginLockingHours.Visible = true;
                TbLoginLockingHours.Text    = ConfigManager.SystemConfigInfo.AdminLockLoginHours.ToString();
            }

            EBooleanUtils.AddListItems(RblIsFindPassword, "启用", "禁用");
            ControlUtils.SelectSingleItemIgnoreCase(RblIsFindPassword, ConfigManager.SystemConfigInfo.IsAdminFindPassword.ToString());
            PhFindPassword.Visible      = ConfigManager.SystemConfigInfo.IsAdminFindPassword;
            TbFindPasswordSmsTplId.Text = ConfigManager.SystemConfigInfo.AdminFindPasswordSmsTplId;

            EBooleanUtils.AddListItems(RblIsViewContentOnlySelf, "不可以", "可以");
            ControlUtils.SelectSingleItemIgnoreCase(RblIsViewContentOnlySelf, ConfigManager.SystemConfigInfo.IsViewContentOnlySelf.ToString());
        }
예제 #5
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            if (!IsPostBack)
            {
                BreadCrumbAdmin(AppManager.Admin.LeftMenu.AdminConfiguration, "管理员设置", AppManager.Admin.Permission.AdminConfiguration);

                tbLoginUserNameMinLength.Text = ConfigManager.SystemConfigInfo.LoginUserNameMinLength.ToString();
                tbLoginPasswordMinLength.Text = ConfigManager.SystemConfigInfo.LoginPasswordMinLength.ToString();
                EUserPasswordRestrictionUtils.AddListItems(ddlLoginPasswordRestriction);
                ControlUtils.SelectListItemsIgnoreCase(ddlLoginPasswordRestriction, EUserPasswordRestrictionUtils.GetValue(ConfigManager.SystemConfigInfo.LoginPasswordRestriction));

                EBooleanUtils.AddListItems(rblIsLoginFailToLock, "是", "否");
                ControlUtils.SelectListItemsIgnoreCase(rblIsLoginFailToLock, ConfigManager.SystemConfigInfo.IsLoginFailToLock.ToString());

                phFailToLock.Visible = false;
                if (ConfigManager.SystemConfigInfo.IsLoginFailToLock)
                {
                    phFailToLock.Visible = true;
                }

                tbLoginFailToLockCount.Text = ConfigManager.SystemConfigInfo.LoginFailToLockCount.ToString();

                ddlLoginLockingType.Items.Add(new ListItem("按小时锁定", EUserLockTypeUtils.GetValue(EUserLockType.Hours)));
                ddlLoginLockingType.Items.Add(new ListItem("永久锁定", EUserLockTypeUtils.GetValue(EUserLockType.Forever)));
                ControlUtils.SelectListItemsIgnoreCase(ddlLoginLockingType, ConfigManager.SystemConfigInfo.LoginLockingType);

                phLoginLockingHours.Visible = false;
                if (!EUserLockTypeUtils.Equals(ConfigManager.SystemConfigInfo.LoginLockingType, EUserLockType.Forever))
                {
                    phLoginLockingHours.Visible = true;
                    tbLoginLockingHours.Text    = ConfigManager.SystemConfigInfo.LoginLockingHours.ToString();
                }

                EBooleanUtils.AddListItems(rblIsViewContentOnlySelf, "不可以", "可以");
                ControlUtils.SelectListItemsIgnoreCase(rblIsViewContentOnlySelf, ConfigManager.SystemConfigInfo.IsViewContentOnlySelf.ToString());
            }
        }
예제 #6
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }
            if (IsPostBack)
            {
                return;
            }

            BreadCrumbUser(AppManager.User.LeftMenu.UserConfiguration, "用户登录配置", AppManager.User.Permission.UserConfiguration);

            EBooleanUtils.AddListItems(RblIsRecordIp, "是", "否");
            ControlUtils.SelectListItemsIgnoreCase(RblIsRecordIp, ConfigManager.UserConfigInfo.IsRecordIp.ToString());
            EBooleanUtils.AddListItems(RblIsRecordSource, "是", "否");
            ControlUtils.SelectListItemsIgnoreCase(RblIsRecordSource, ConfigManager.UserConfigInfo.IsRecordSource.ToString());
            EBooleanUtils.AddListItems(RblIsFailToLock, "是", "否");
            ControlUtils.SelectListItemsIgnoreCase(RblIsFailToLock, ConfigManager.UserConfigInfo.IsLoginFailToLock.ToString());

            PhFailToLock.Visible = ConfigManager.UserConfigInfo.IsLoginFailToLock;

            TbLoginFailCount.Text = ConfigManager.UserConfigInfo.LoginFailToLockCount.ToString();

            DdlLockType.Items.Add(new ListItem("按小时锁定", EUserLockTypeUtils.GetValue(EUserLockType.Hours)));
            DdlLockType.Items.Add(new ListItem("永久锁定", EUserLockTypeUtils.GetValue(EUserLockType.Forever)));
            ControlUtils.SelectListItemsIgnoreCase(DdlLockType, ConfigManager.UserConfigInfo.LoginLockingType);
            TbLockingTime.Text = ConfigManager.UserConfigInfo.LoginLockingHours.ToString();

            PhLockingTime.Visible = false;
            PhLockingTime.Visible = EUserLockTypeUtils.Equals(ConfigManager.UserConfigInfo.LoginLockingType, EUserLockType.Hours);

            EBooleanUtils.AddListItems(RblIsFindPassword, "启用", "禁用");
            ControlUtils.SelectListItemsIgnoreCase(RblIsFindPassword, ConfigManager.UserConfigInfo.IsFindPassword.ToString());
            PhFindPassword.Visible      = ConfigManager.UserConfigInfo.IsFindPassword;
            TbFindPasswordSmsTplId.Text = ConfigManager.UserConfigInfo.FindPasswordSmsTplId;
        }
예제 #7
0
 public void DdlLoginLockingType_SelectedIndexChanged(object sender, EventArgs e)
 {
     PhLoginLockingHours.Visible = !EUserLockTypeUtils.Equals(EUserLockType.Forever, DdlLoginLockingType.SelectedValue);
 }
예제 #8
0
 protected void ddlLockType_SelectedIndexChanged(object sender, EventArgs e)
 {
     phLockingTime.Visible = !EUserLockTypeUtils.Equals(EUserLockType.Forever, ddlLockType.SelectedValue);
 }