private void buttonADD_Click(object sender, EventArgs e) { using (AddEdit_MovieForm frm = new AddEdit_MovieForm(null, 0)) { if (frm.ShowDialog() == DialogResult.OK) { mOVIEBindingSource.DataSource = db.Movies.ToList(); } } }
private void dgvMovies_DoubleClick(object sender, EventArgs e) { model.MID = Convert.ToInt32(dgvMovies.CurrentRow.Cells["MID"].Value); using (AddEdit_MovieForm frm = new AddEdit_MovieForm(mOVIEBindingSource.Current as MOVIE, model.MID)) { if (frm.ShowDialog() == DialogResult.OK) { mOVIEBindingSource.DataSource = db.Movies.ToList(); } } }