public void EditerRecompense(RecompenseWPF b) { if (Recompenses.Count() > 0) { for (int i = 0; i < Recompenses.Count(); i++) { if (Recompenses[i].recompenseId == b.recompenseId) { Recompenses[i] = b; i = Recompenses.Count() + 2; } } } DalRecomp.Update(b.GetRecompenseDal()); }
public void AjouterRecompense(RecompenseWPF a) { a.recompenseId = DalRecomp.Create(a.GetRecompenseDal()); // a.recompenseId = DalRecomp.GetAll().LastOrDefault().recompenseId; Recompenses.Add(a); }