/// <summary>
 /// 加查输入的有效性
 /// </summary>
 public override bool CheckInput()
 {
     // 密码强度检查
     if (BaseSystemInfo.CheckPasswordStrength)
     {
         // 原密码为空
         if (this.txtOldPassword.Text.Length == 0)
         {
             MessageBox.Show(AppMessage.Format(AppMessage.MSG0007, AppMessage.MSG9961), AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
             this.txtOldPassword.Focus();
             return(false);
         }
         // 新密码为空
         if (this.txtNewPassword.Text.Length == 0)
         {
             MessageBox.Show(AppMessage.Format(AppMessage.MSG0007, AppMessage.MSG9959), AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
             this.txtNewPassword.Focus();
             return(false);
         }
         // 确认密码为空
         if (this.txtConfirmPassword.Text.Length == 0)
         {
             MessageBox.Show(AppMessage.Format(AppMessage.MSG0007, AppMessage.MSG9960), AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
             this.txtConfirmPassword.Focus();
             return(false);
         }
         if (!BaseCheckInput.CheckPasswordStrength(this.txtNewPassword))
         {
             return(false);
         }
     }
     // 新密码不一致
     if (this.txtConfirmPassword.Text != this.txtNewPassword.Text)
     {
         MessageBox.Show(AppMessage.Format(AppMessage.MSG0039, AppMessage.MSG9959, AppMessage.MSG9960), AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
         this.ClearNewPassword();
         return(false);
     }
     if (this.txtDigitalSignature.Text.Length == 0)
     {
         MessageBox.Show("请选择签名密钥文件存放位置。", AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
         this.btnSelectDigitalSignature.Focus();
         return(false);
     }
     else
     {
         if (!System.IO.File.Exists(this.txtDigitalSignature.Text))
         {
             this.txtDigitalSignature.Text = string.Empty;
             MessageBox.Show("请选择签名密钥文件存放位置。", AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
             this.btnSelectDigitalSignature.Focus();
             return(false);
         }
     }
     return(true);
 }
Example #2
0
        /// <summary>
        /// 检查输入的有效性
        /// </summary>
        /// <returns>有效</returns>
        public override bool CheckInput()
        {
            bool returnValue = true;

            this.txtUserName.Text = this.txtUserName.Text.TrimEnd();
            if (this.txtUserName.Text.Trim().Length == 0)
            {
                MessageBox.Show(AppMessage.Format(AppMessage.MSG0007, AppMessage.MSG9957), AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.txtUserName.Focus();
                return(false);
            }
            // 这里需要检查系统设置的用户名长度限制
            if (BaseSystemInfo.CheckPasswordStrength && BaseSystemInfo.AccountMinimumLength > 0)
            {
                if (this.txtUserName.Text.Trim().Length < BaseSystemInfo.AccountMinimumLength)
                {
                    MessageBox.Show(AppMessage.Format(AppMessage.MSG0026, AppMessage.MSG9957, BaseSystemInfo.AccountMinimumLength.ToString()), AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.txtUserName.Focus();
                    return(false);
                }
            }
            this.txtRealName.Text = this.txtRealName.Text.TrimEnd();
            if (this.txtRealName.Text.Trim().Length == 0)
            {
                MessageBox.Show(AppMessage.Format(AppMessage.MSG0007, AppMessage.MSG9978), AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.txtRealName.Focus();
                return(false);
            }

            // 密码不能为空
            if (BaseSystemInfo.CheckPasswordStrength)
            {
                if (this.txtPassword.Text.Trim().Length == 0)
                {
                    MessageBox.Show(AppMessage.Format(AppMessage.MSG0007, AppMessage.MSG9964), AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.txtPassword.Focus();
                    return(false);
                }
                if (!BaseCheckInput.CheckPasswordStrength(this.txtPassword))
                {
                    return(false);
                }
            }
            if (!this.txtConfirmPassword.Text.Equals(this.txtPassword.Text))
            {
                MessageBox.Show(AppMessage.MSG9967, AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.txtPassword.Clear();
                this.txtConfirmPassword.Clear();
                this.txtPassword.Focus();
                return(false);
            }
            return(returnValue);
        }
Example #3
0
        /// <summary>
        /// 检查输入的有效性
        /// </summary>
        /// <returns>有效</returns>
        public override bool CheckInput()
        {
            bool returnValue = true;

            if (!BaseCheckInput.CheckEmpty(this.txtFolderName, AppMessage.Format(AppMessage.MSG0007, AppMessage.MSG9974)))
            {
                return(false);
            }
            if (!BaseCheckInput.CheckFolderName(this.txtFolderName, AppMessage.Format(AppMessage.MSG0032, AppMessage.MSG9974)))
            {
                return(false);
            }
            return(returnValue);
        }
Example #4
0
        /// <summary>
        /// 检查输入的有效性
        /// </summary>
        /// <returns>有效</returns>
        public override bool CheckInput()
        {
            bool returnValue = true;

            if (!string.IsNullOrEmpty(this.txtEmail.Text))
            {
                if (ValidateUtil.CheckEmail(this.txtEmail.Text))
                {
                    if (!BaseCheckInput.CheckEmail(this.txtEmail, AppMessage.MSG0234))
                    {
                        return(false);
                    }
                }
            }
            return(returnValue);
        }
Example #5
0
 /// <summary>
 /// 加查输入的有效性
 /// </summary>
 public override bool CheckInput()
 {
     // 密码强度检查
     if (BaseSystemInfo.CheckPasswordStrength)
     {
         // 原来密码为空
         if (this.txtOldPassword.Text.Length == 0)
         {
             // 判断是否为确认按钮
             MessageBox.Show(AppMessage.Format(AppMessage.MSG0007, AppMessage.MSG9961), AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
             this.txtOldPassword.Focus();
             return(false);
         }
         // 新密码为空
         if (this.txtNewPassword.Text.Length == 0)
         {
             // 判断是否为确认按钮
             MessageBox.Show(AppMessage.Format(AppMessage.MSG0007, AppMessage.MSG9959), AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
             this.txtNewPassword.Focus();
             return(false);
         }
         // 确认密码为空
         if (this.txtConfirmPassword.Text.Length == 0)
         {
             MessageBox.Show(AppMessage.Format(AppMessage.MSG0007, AppMessage.MSG9960), AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
             this.txtConfirmPassword.Focus();
             return(false);
         }
         if (!BaseCheckInput.CheckPasswordStrength(this.txtNewPassword))
         {
             return(false);
         }
     }
     // 新密码不一致
     if (this.txtConfirmPassword.Text != this.txtNewPassword.Text)
     {
         MessageBox.Show(AppMessage.Format(AppMessage.MSG0039, AppMessage.MSG9959, AppMessage.MSG9960), AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
         this.ClearNewPassword();
         return(false);
     }
     return(true);
 }
Example #6
0
        /// <summary>
        /// 检查输入的有效性
        /// </summary>
        /// <returns>有效</returns>
        public override bool CheckInput()
        {
            bool returnValue = true;

            this.txtUserName.Text = this.txtUserName.Text.TrimEnd();
            if (!BaseCheckInput.CheckEmpty(this.txtUserName, AppMessage.Format(AppMessage.MSG0007, AppMessage.MSG9957)))
            {
                return(false);
            }
            // 这里需要检查系统设置的用户名长度限制
            if (BaseSystemInfo.CheckPasswordStrength && BaseSystemInfo.AccountMinimumLength > 0)
            {
                if (this.txtUserName.Text.Trim().Length < BaseSystemInfo.AccountMinimumLength)
                {
                    MessageBox.Show(AppMessage.Format(AppMessage.MSG0026, AppMessage.MSG9957, BaseSystemInfo.AccountMinimumLength.ToString()), AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.txtUserName.Focus();
                    return(false);
                }
            }
            this.txtRealName.Text = this.txtRealName.Text.TrimEnd();
            if (!BaseCheckInput.CheckEmpty(this.txtRealName, AppMessage.Format(AppMessage.MSG0007, AppMessage.MSG0233)))
            {
                return(false);
            }
            if (!string.IsNullOrEmpty(this.txtEmail.Text))
            {
                if (!BaseCheckInput.CheckEmail(this.txtEmail, "E_mail 格式不正确,请重新输入。"))
                {
                    return(false);
                }
            }
            if (this.ucCompany.SelectedFullName.Length == 0)
            {
                MessageBox.Show(AppMessage.MSG0229, AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ucCompany.Focus();
                return(false);
            }
            return(returnValue);
        }
Example #7
0
        /// <summary>
        /// 检查输入的有效性
        /// </summary>
        /// <returns>有效</returns>
        public override bool CheckInput()
        {
            bool returnValue = true;

            this.txtUserName.Text = this.txtUserName.Text.TrimEnd();
            if (!BaseCheckInput.CheckEmpty(this.txtUserName, AppMessage.Format(AppMessage.MSG0007, AppMessage.MSG0232)))
            {
                return(false);
            }
            this.txtRealName.Text = this.txtRealName.Text.TrimEnd();
            if (!BaseCheckInput.CheckEmpty(this.txtRealName, AppMessage.Format(AppMessage.MSG0007, AppMessage.MSG0233)))
            {
                return(false);
            }
            if (!string.IsNullOrEmpty(this.txtEmail.Text))
            {
                if (!BaseCheckInput.CheckEmail(this.txtEmail, AppMessage.MSG0234))
                {
                    return(false);
                }
            }
            if (this.txtConfirmPassword.Text != this.txtPassword.Text)
            {
                MessageBox.Show(AppMessage.MSG0231, AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.txtPassword.Clear();
                this.txtConfirmPassword.Clear();
                this.txtPassword.Focus();
                return(false);
            }
            if (string.IsNullOrEmpty(this.ucCompany.SelectedId))
            {
                MessageBox.Show(AppMessage.MSG0229, AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ucCompany.Focus();
                return(false);
            }
            return(returnValue);
        }