public void TestInscription_Connexion() { SQLupdate SQLupdate = new SQLupdate(); SQLupdate.Inscription("Jean", "Didier", "xXD4rk_JeanDidXx", "ToTheMoon"); SQLselect SQLselect = new SQLselect(); int i = SQLselect.SQLConnexion("xXD4rk_JeanDidXx", "ToTheMoon"); Assert.IsTrue(i == 1); }
/// <summary> /// Bouton Connexion /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Connexion(object sender, RoutedEventArgs e) { SQLselect SQLselect = new SQLselect(); int i = SQLselect.SQLConnexion(login.Text, mdp.Password); if (i == 1) { Accueil Accueil = new Accueil(); Accueil.Show(); this.Close(); } else { MessageBox.Show("Identifiant ou mot de passe incorrect", "Erreur"); } }