Esempio n. 1
0
        public void Init(Films films)
        {
            this.films = films;

            dgFilms.Rows.Clear();
            foreach (var film in films.GetFilms())
            {
                AddFilmRow(film);
            }
        }
Esempio n. 2
0
        public void Init(Seances seances, Films films, Rooms rooms)
        {
            this.films   = films;
            this.rooms   = rooms;
            this.seances = seances;

            /*
             * var cbColumnRoom = dgSeances.Columns[cRoom.Name] as DataGridViewComboBoxColumn;
             * cbColumnRoom.DataSource = rooms.GetList().Select(r => r.Name).ToList();
             *
             * var cbFilmRoom = dgSeances.Columns[cFilm.Name] as DataGridViewComboBoxColumn;
             * cbFilmRoom.DataSource = films.GetFilms().Select(f => f.Name).ToList();
             */
            DisplaySeances();
        }
Esempio n. 3
0
        public void Init(Seance seance, Rooms rooms, Films films)
        {
            this.seance  = seance;
            this.rooms   = rooms;
            this.films   = films;
            tbDate.Value = seance.Date;
            tbPrice.Text = seance.Price.ToString();
            tbTime.Text  = seance.Time;

            cbRooms.DataSource = rooms.GetList();
            cbFilms.DataSource = films.GetFilms();

            if (seance.Room != null)
            {
                cbRooms.SelectedItem = seance.Room;
            }

            if (seance.Film != null)
            {
                cbFilms.SelectedItem = seance.Film;
            }
        }
Esempio n. 4
0
        public void Load(Films films, Rooms rooms)
        {
            var lines = File.ReadAllLines("Seances.txt");

            allSeances = lines.Select(l => CreateSeance(l, films, rooms)).Where(f => f != null).ToList();
        }