private void buttonADD_Click(object sender, EventArgs e) { using (AddEdit_TheatreForm frm = new AddEdit_TheatreForm(null, 0)) { if (frm.ShowDialog() == DialogResult.OK) { tHEATREBOOKBindingSource.DataSource = db.THEATREBOOKs.ToList(); } } }
private void dgvTheatre_DoubleClick(object sender, EventArgs e) { model.TID = Convert.ToInt32(dgvTheatre.CurrentRow.Cells["TID"].Value); using (AddEdit_TheatreForm frm = new AddEdit_TheatreForm(tHEATREBOOKBindingSource.Current as THEATREBOOK, model.TID)) { if (frm.ShowDialog() == DialogResult.OK) { tHEATREBOOKBindingSource.DataSource = db.THEATREBOOKs.ToList(); } } }