コード例 #1
0
 // 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;
     }
 }
コード例 #2
0
 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;
     }
 }