Beispiel #1
0
        private bool CheckTB()
        {
            bool result = true;

            if (String.IsNullOrEmpty(oldPasswordTB.Text))
            {
                errorMsg.SetError(oldPasswordTB, "Old Password is missing."); result = false; oldPasswordTB.Focus();
            }
            else
            {
                errorMsg.SetError(oldPasswordTB, "");
            }
            if (String.IsNullOrEmpty(NewPasswordTB.Text))
            {
                errorMsg.SetError(NewPasswordTB, "New Password is missing."); result = false; NewPasswordTB.Focus();
            }
            else
            {
                errorMsg.SetError(NewPasswordTB, "");
            }
            if (String.IsNullOrEmpty(ConfirmPassTB.Text))
            {
                errorMsg.SetError(ConfirmPassTB, "Confirm Password is missing."); result = false; ConfirmPassTB.Focus();
            }
            else
            {
                errorMsg.SetError(ConfirmPassTB, "");
            }

            return(result);
        }