// Login Database private void bunifuThinButton21_Click(object sender, EventArgs e) { if (ConnectionFunc.TryLogin(textboxUsername.Text, textboxPassword.Text, lblLog)) { this.Hide(); new Home().Show(); } else { lblLog.Text = "Credenziali errate. Riprovare."; lblLog.ForeColor = Color.Red; } }
private void btnResetPassword_Click(object sender, EventArgs e) { if (txtboxNewPassword.Text == txtboxConfirmPassword.Text) { try { ConnectionFunc.ResetPassword(txtboxNewPassword.Text, lblLog); } catch (Exception ex) { MessageBox.Show(ex.Message); }; } else { lblLog.Text = "La password non corrisponde. Riprovare."; lblLog.ForeColor = Color.Red; } }