//слушатель кнопки "Добавить" private void createEntityListener(object sender, EventArgs e) { client c = new client { birthday = DateTime.Now }; FormForInteracting form = new FormForInteracting(c); form.ShowDialog(); setDGVDatasource(); }
//слушатель для DGV private void dataGridView_CellMouseDoubleClick (object sender, DataGridViewCellMouseEventArgs e) { if (e.RowIndex < 0) { return; } ; client c = dataGridView.Rows[e.RowIndex].DataBoundItem as client; FormForInteracting form = new FormForInteracting(c); form.ShowDialog(); setDGVDatasource(); }