public void SupprimerCategorie(int id) { Modele.categorie categorieToRemove = getLaCategorie(id); db.categorie.Remove(categorieToRemove); db.SaveChanges(); MessageBox.Show("La catégorie " + id + " a bien été supprimée!"); }
public void ModifierCategorie(int x, String libelle) { Modele.categorie cat = getLaCategorie(x); cat.lib_categorie = libelle; db.SaveChanges(); MessageBox.Show("La catégorie n°" + x + " a bien été modifiée!"); }