public void AddFilm(Film filmParam)
 {
     filmParam.FilmID = ID++;
     films.Add(filmParam);
 }
Beispiel #2
0
        private void AddFiml_bnt_Click(object sender, EventArgs e)
        {

            Film newFilm = new Film();
            repository.AddFilm(newFilm);
            editForm = new EditForm(ref newFilm);
            DialogResult dr = editForm.ShowDialog();
            if (dr != DialogResult.OK)
                repository.RemoveFilm(repository.Films.Last().FilmID); 
            RefreshCurrentList(repository.Films);
            //if(repository.Films.Count()>=1)
            //    Film_list.SetSelected(repository.Films.Count() - 1, true);
        }
Beispiel #3
0
 public EditForm(ref Film filmParam)
 {
     filmForEdit = filmParam;
     InitializeComponent();
     category_combobox.SelectedIndex = 0;
 }