public void AddFilm(Film filmParam) { filmParam.FilmID = ID++; films.Add(filmParam); }
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); }
public EditForm(ref Film filmParam) { filmForEdit = filmParam; InitializeComponent(); category_combobox.SelectedIndex = 0; }