public async Task DeleteFilm() { await FilmService.DeleteFilm(ViewModel.Film.Id); ViewModel.Film = null; ViewModel.Source = NavigationServices.GetPage <Films, FilmsViewModel>(ViewModel); }
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(); } }
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()); }
public async void DeleteFilm() { await filmService.DeleteFilm(CurrentFilm); CallService(); }
//删除电影 public static void DeleteFilm(int id) { FilmService.DeleteFilm(id); }
public async Task <ActionResult <Film> > DeleteFilm(string imdbid) { return(await _films.DeleteFilm(imdbid)); }
public ActionResult <ResponseObject <Film> > DeleteFilm(string filmId) { return(_businessware.DeleteFilm(filmId)); }