private void BtnInscription_Click(object sender, EventArgs e) { if (txtNom.Text != null || txtPrenom.Text != null || txtAdresse.Text != null || txtVille.Text != null || txtCP.Text != null || txtNumFixe.Text != null || txtNumPort.Text != null || txtMail.Text != null || txtMDP.Text != null || txtCMDP.Text != null) { if (txtMDP.Text == txtCMDP.Text) { MySqlCommand cmd = new MySqlCommand("insert into clients(nom,prenom,adresse,ville,codePostal,numFixe,numPortable,mail,mdp) VALUES('" + txtNom.Text + "', '" + txtPrenom.Text + "', '" + txtAdresse.Text + "','" + txtVille.Text + "', '" + txtCP.Text + "'" + ", '" + txtNumFixe.Text + "', '" + txtNumPort.Text + "', '" + txtMail.Text + "', '" + txtMDP.Text + "')", connect); cmd.ExecuteNonQuery(); MessageBox.Show("Vos données ont été enregistrées avec succès"); this.Hide(); accueil.Show(); } else { MessageBox.Show("Confirmation du mot de passe incorrecte"); } } else { MessageBox.Show("Formulaire incomplet"); } }
private void btnRetour_Click(object sender, EventArgs e) { accueil.Show(); this.Hide(); }