public MainWindow() { InitializeComponent(); RecetteAccess.GetRecette(); this.poissoncategorie.ItemsSource = Business.GetByCategorie("Poissons"); this.viandecategorie.ItemsSource = Business.GetByCategorie("Viande"); this.fruitdemercategorie.ItemsSource = Business.GetByCategorie("Fruits de mers"); this.chevrecategorie.ItemsSource = Business.GetByCategorie("Chèvre"); }
private void recupDonnees() { rec.Nom = this.title.Text; rec.Ingredients = this.ingredients.Text; rec.Preparation = this.preparations.Text; if (isEditMode == false) { RecetteAccess.InsertRecette(rec); Business.Recettes.Add(rec); } else { RecetteAccess.UpdateRecette(rec); } }