private void Suivant_Click(object sender, EventArgs e) { try { if (listePoint.Count <= 2) { throw new Exception("points insuffisants"); } if (NomStade.Text.CompareTo("") == 0) { throw new Exception("Ajoutez un nom au stade !"); } // IGENERER-NA ID ILAY STADE Fonction F = new Fonction(); DBConnect dbc = new DBConnect(); int idStadee = F.getId(dbc, "stade"); string idStade = "STADE" + idStadee; Stade stade = new Stade(idStade, NomStade.Text, 0, Fonction.convertString(listePoint.ToArray <Point>())); // ETO N MI-INSERER ANLE STADE F.insertStade(dbc, stade); CreateZone cz = new CreateZone(); cz.Stade = stade; cz.Show(); }catch (Exception ex) { MessageBox.Show(ex.Message); } }