public void EditerCommande(CommandeWPF b) { if (Commandes.Count() > 0) { for (int i = 0; i < Commandes.Count(); i++) { if (Commandes[i].commandeId == b.commandeId) { Commandes[i].biereId = b.biereId; Commandes[i].commandeQuantite = b.commandeQuantite; i = Commandes.Count() + 2; } } } DalCom.Update(b.GetCommandeDal()); }
public void AjouterCommande(CommandeWPF a) { a.commandeId = DalCom.Create(a.GetCommandeDal()); // a.commandeId = DalCom.GetAll().LastOrDefault().commandeId; Commandes.Add(a); }