public void Delete(Showtime showtime) { var result = MessageBox.Show( string.Format(Resources.DeleteShowtimeConfirmatonText, showtime.Time.ToLongDateString(), showtime.Movie.Title), Resources.DeleteConfirmationCaption, MessageBoxButton.YesNo); if (result == MessageBoxResult.Yes) { try { repository.Delete(showtime); RetrieveData(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } }
public void DeleteGenre(Auditorium auditorium) { var result = MessageBox.Show( string.Format(Resources.DeleteAuditoriumConfirmationText, auditorium.Name), Resources.DeleteConfirmationCaption, MessageBoxButton.YesNo); if (result == MessageBoxResult.Yes) { try { repository.Delete(auditorium); RetrieveData(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } }
public void Delete(int showtimeId) { repository.Delete(showtimeId); repository.Save(); }