/// <summary> /// Fonction qui supprime une tâche de la liste. /// </summary> /// <param name="identifiant">int</param> private void TacheVM_SupprimerTache(int identifiant) { TacheViewModel tachesViewModelTemp = new TacheViewModel(); foreach (var taches in ListeTachesViewModel) { if (identifiant == taches.Identifiant) { tachesViewModelTemp = taches; } } ListeTachesViewModel.Remove(tachesViewModelTemp); }
private void ajoutCategorieANouvelleTache(TacheViewModel tacheVM) { ObservableCollection<CategorieViewModel> listCatVM = new ObservableCollection<CategorieViewModel>(); // Création de la nouvelle liste de catégorie foreach (var cat in Menu.ListeCategoriesMenuVM) { CategorieViewModel catVM = new CategorieViewModel(new VOCategorie() { Nom = cat.NomCategorie }); listCatVM.Add(catVM); } tacheVM.CategoriesProjet = listCatVM; }