示例#1
0
        private void FORGOT_btnUsername_Click(object sender, EventArgs e)
        {
            // Check if the field is not empty
            if (FORGOT_txtUsername.Text != string.Empty)
            {
                // Check if this email exists in the database
                if (authenticationService.CheckEmailStatus(FORGOT_txtUsername.Text.ToLower()))
                {
                    // Hide the reset password username/email panel and show the insert code panel
                    FORGOT_pnlUsername.Hide();
                    FORGOT_pnlCode.Show();

                    // Send an email with a code that the user needs to fill in to request a new randomized password by email
                    authenticationService.RequestResetCode(FORGOT_txtUsername.Text.ToLower());
                }
                else
                {
                    // Error message if the email is not found
                    errorProvider.SetError(FORGOT_txtUsername, "This email address has not been registered");
                }
            }
            else
            {
                errorProvider.SetError(FORGOT_txtUsername, "Please enter your email before continuing");
            }
        }
示例#2
0
 private void FORGOT_btnResetComplete_Click(object sender, EventArgs e)
 {
     ShowPanel(PanelType.LOGIN);
     FORGOT_pnlUsername.Show();
 }
示例#3
0
 private void FORGOT_btnBackFromCode_Click(object sender, EventArgs e)
 {
     ShowPanel(PanelType.LOGIN);
     FORGOT_pnlUsername.Show();
 }
示例#4
0
 private void FORGOT_btnNewCode_Click(object sender, EventArgs e)
 {
     FORGOT_pnlUsername.Show();
     FORGOT_pnlCode.Hide();
     FORGOT_pnlChange.Hide();
 }