public Schedule(String Day, string Time, Movie Mov, string Price, int AvailSeats) { this.Day = Day; this.AvailSeats = AvailSeats; this.Time = Time; this.Mov = Mov; this.Price = Price; }
public void LoadSchedule(List<Input> lstinp) { Movie m = null; Cineplex c = null; foreach (Input i in lstinp) { if (lstcineplex.Count == 0) { c = new Cineplex(i.Loc); lstcineplex.Add(c); } else { int k = 0; foreach (Cineplex Cpl in lstcineplex) { if (Cpl.GetCineplex().Equals(i.Loc)) { c = Cpl; k = 1; break; } } if (k == 0) { c = new Cineplex(i.Loc); lstcineplex.Add(c); } } int j = 0, found = 0; foreach (Movie mov in lstMovie) { if (mov.GetMovieName().Equals(i.movie)) { found = 1; // m = mov; c.AddSchedule(i.Day, new Schedule(i.Day, i.time, mov, i.price, i.Seats)); break; } } if (found == 0) { m = new Movie(i.movie); c.AddSchedule(i.Day, new Schedule(i.Day, i.time, m, i.price, i.Seats)); lstMovie.Add(m); } } }