Esempio n. 1
0
 private void DeleteDirector()
 {
     if (CanDeleteDirector)
     {
         if (ConfirmationHelper.ConfirmationYesNo("Voulez-vous vraiment supprimer ce élément ?", "Confirmation"))
         {
             var directorToDelete = Directors.Where(x => x.DirectorId == DirectorEdit.DirectorId).FirstOrDefault();
             if (directorToDelete != null)
             {
                 if (_directorService.DeleteDirector(directorToDelete))
                 {
                     InitListDirector();
                     directorToDelete.PropertyChanged -= Director_PropertyChanged;
                     InitCurrentDirector();
                 }
             }
         }
     }
 }
Esempio n. 2
0
 private void DeleteFilm()
 {
     if (CanDeleteFilm)
     {
         if (ConfirmationHelper.ConfirmationYesNo("Voulez-vous vraiment supprimer ce élément ?", "Confirmation"))
         {
             var filmToDelete = Films.Where(x => x.FilmId == FilmEdit.FilmId).FirstOrDefault();
             if (filmToDelete != null)
             {
                 if (_filmService.DeleteFilm(filmToDelete))
                 {
                     InitListFilm();
                     filmToDelete.PropertyChanged -= Film_PropertyChanged;
                     InitCurrentFilm();
                     InitFilmEdit();
                 }
             }
         }
     }
 }