Exemple #1
0
        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();
        }
Exemple #2
0
        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();
        }