private void BtnBuscar1_Click(object sender, EventArgs e) { using (var forms = new frmPeriodoAdd("(Períodos) Adicionar")) { if (forms.ShowDialog() == DialogResult.OK) { ListGeral(); } } }
private void BtnNovos_Click(object sender, System.EventArgs e) { using (var frm = new frmPeriodoAdd("Períodos: (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 = periodoViewModelsBindingSource.Current as Periodo; using (var forms = new frmPeriodoAdd("(Período) Adicionar", result ?? null)) { if (forms.ShowDialog() == DialogResult.OK) { ListGeral(); } } } }