private void BtnNovos_Click(object sender, System.EventArgs e) { using (var frm = new frmGruposAdd("Grupos: (Adicionar)")) { var result = frm.ShowDialog(); if (result == DialogResult.OK) { ListGeral(); } } }
private void GridView1_DoubleClick(object sender, System.EventArgs e) { if (gridView1.SelectedRowsCount > 0) { var result = gruposViewModelsBindingSource.Current as Grupos; using (var forms = new frmGruposAdd("(Grupos) Adicionar", result ?? null)) { if (forms.ShowDialog() == DialogResult.OK) { ListGeral(); } } } }