private void RetrieveData()
        {
            if (Showtimes == null)
            {
                Showtimes = new ObservableCollection <Showtime>();
            }

            var showtimes = repository.GetPendingShowtimes(Movie.Id).ToList();

            Showtimes.Clear();
            showtimes.ForEach(showtime => Showtimes.Add(showtime));
        }
예제 #2
0
        public void CreateShowtime(Theater theater, Movie movie, string time)
        {
            var newShowtime = new Showtime()
            {
                Cinema  = this,
                Theater = theater,
                Movie   = movie,
                Time    = time
            };

            Showtimes.Add(newShowtime);
            MakeTickets(newShowtime);
        }
예제 #3
0
 // because we made the defition private we are using this method to add the showtimes.. this is a setter
 public void AddShowtime(string time)
 {
     Showtimes.Add(time, MaxSeats);
 }