Пример #1
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);
        }
Пример #2
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);
        }
Пример #3
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);
        }