예제 #1
0
        public async Task DeleteFilm()
        {
            await FilmService.DeleteFilm(ViewModel.Film.Id);

            ViewModel.Film   = null;
            ViewModel.Source = NavigationServices.GetPage <Films, FilmsViewModel>(ViewModel);
        }
예제 #2
0
        public ActionResult DeleteFilm(int id)
        {
            var service = new FilmService();

            if (service.DeleteFilm(id))
            {
                return(RedirectToAction("Index"));
            }

            TempData["SaveResult"] = "The film was deleted.";

            return(RedirectToAction("Delete", new { id }));
        }
        private async Task GoToSupprimerFilmAsync()
        {
            if (FilmSelection != null)
            {
                FilmService filmService = new FilmService();
                await filmService.DeleteFilm(FilmSelection.FilmId);

                _navigationService.NavigateTo("GestionFilmsView");
            }
            else
            {
                var dialogue = new Windows.UI.Popups.MessageDialog("Un film doit être sélectionné");
                dialogue.ShowAsync();
            }
        }
예제 #4
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();
                 }
             }
         }
     }
 }
 public IActionResult DeleteFilm([FromRoute] long id)
 {
     _filmService.DeleteFilm(id);
     return(Ok());
 }
예제 #6
0
        public async void DeleteFilm()
        {
            await filmService.DeleteFilm(CurrentFilm);

            CallService();
        }
예제 #7
0
 //删除电影
 public static void DeleteFilm(int id)
 {
     FilmService.DeleteFilm(id);
 }
예제 #8
0
 public async Task <ActionResult <Film> > DeleteFilm(string imdbid)
 {
     return(await _films.DeleteFilm(imdbid));
 }
 public ActionResult <ResponseObject <Film> > DeleteFilm(string filmId)
 {
     return(_businessware.DeleteFilm(filmId));
 }