private void btnNuevo_Click(object sender, EventArgs e) { AbmPatologia dialog = new AbmPatologia(); if (dialog.ShowDialog(this) == DialogResult.OK) { ActualizarLista(gestor.Listar()); } dialog.Dispose(); }
private void btnModificar_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count > 0) { AbmPatologia dialog = new AbmPatologia(); dialog.Seleccionado = (Patologia)dataGridView1.SelectedRows[0].DataBoundItem; if (dialog.ShowDialog(this) == DialogResult.OK) { ActualizarLista(gestor.Listar()); } dialog.Dispose(); } }