private void BtAdd_Click(object sender, EventArgs e) { InputMovieForm inForm = new InputMovieForm(); if (inForm.ShowDialog() == DialogResult.OK) { dgv.Rows.Add(Movie.MovieToRow(inForm.movie, dgv)); } inForm.Dispose(); }
private void ChangeRow(DataGridViewRow row) { InputMovieForm inForm = new InputMovieForm(Movie.RowToMovie(row)); inForm.EditOrFind(); if (inForm.DialogResult == DialogResult.OK) { int index = row.Index; dgv.Rows.RemoveAt(index); dgv.Rows.Insert(index, Movie.MovieToRow(inForm.movie, dgv)); RefreshIndex(); } inForm.Dispose(); }