예제 #1
0
파일: MainForm.cs 프로젝트: prmxtt/cinema
 void UpdateFilmList()
 {
     cbFilms.Items.Clear();
     foreach (var film in films.GetFilms())
     {
         cbFilms.Items.Add(film);
     }
 }
예제 #2
0
파일: FilmsForm.cs 프로젝트: prmxtt/cinema
        public void Init(Films films)
        {
            this.films = films;

            dgFilms.Rows.Clear();
            foreach (var film in films.GetFilms())
            {
                AddFilmRow(film);
            }
        }
예제 #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;
            }
        }