Exemplo n.º 1
0
        public static void ajoutAdherent(adherent unAdherent)
        {
            MySqlCommand maCommande = connection.CreateCommand();

            maCommande.CommandText = "insert into `adherent` (`nom`, `prenom`, `sexe`, `naissance`, `rueAdresse`, `cp`, `ville`, `cotisation`) values ( '" + unAdherent.getNom() + "','" + unAdherent.getPrenom() + "','" + unAdherent.getSexe() + "','" + unAdherent.getDateNaissance() + "','" + unAdherent.getRueAdresse() + "','" + unAdherent.getCp() + "','" + unAdherent.getVille() + "','" + unAdherent.getCotisation() + "')";
            connection.Open();
            maCommande.ExecuteReader();
            connection.Close();
        }