private void btnCrear_Click(object sender, EventArgs e) { using (var form = new FormNuevaVariedad()) { var result = form.ShowDialog(); if (result == DialogResult.OK) { RefreshGrid(); } } }
private void btnNuevaVariedad_Click(object sender, EventArgs e) { using (var form = new FormNuevaVariedad()) { var result = form.ShowDialog(); if (result == DialogResult.OK) { ControllerPeces.Instance.PopulateComboboxVariedades(ref comboboxVariedades, ref idVariedadesCombobox, idEspeciesCombobox[comboboxEspecies.SelectedIndex], true); } } }
private void ModificarVariedad() { int colIdVariedad = ManagerGrids.Instance.GetColumnIndexByName(gridVariedades, "IDVARIEDAD"); int idVariedad = Convert.ToInt32(gridVariedades.Rows[gridVariedades.SelectedRows[0].Index].Cells[colIdVariedad].Value); using (var form = new FormNuevaVariedad(idVariedad)) { var result = form.ShowDialog(); if (result == DialogResult.OK) { RefreshGrid(); } } }