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);
                }
            }
        }
示例#2
0
        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);
                }
            }
        }
示例#3
0
 public void Delete(int showtimeId)
 {
     repository.Delete(showtimeId);
     repository.Save();
 }