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"); } }
private void FORGOT_btnResetComplete_Click(object sender, EventArgs e) { ShowPanel(PanelType.LOGIN); FORGOT_pnlUsername.Show(); }
private void FORGOT_btnBackFromCode_Click(object sender, EventArgs e) { ShowPanel(PanelType.LOGIN); FORGOT_pnlUsername.Show(); }
private void FORGOT_btnNewCode_Click(object sender, EventArgs e) { FORGOT_pnlUsername.Show(); FORGOT_pnlCode.Hide(); FORGOT_pnlChange.Hide(); }