private void btnAgregar_Click(object sender, EventArgs e) { frmAlta alta = new frmAlta(); alta.ShowDialog(); cargar(); }
private void btnModificar_Click(object sender, EventArgs e) { Pokemon poke; poke = (Pokemon)dgvLista.CurrentRow.DataBoundItem; frmAlta modificar = new frmAlta(poke); modificar.ShowDialog(); cargar(); }
private void btnModificar_Click(object sender, EventArgs e) { Articulo artic; artic = (Articulo)dgvLista.CurrentRow.DataBoundItem; frmAlta modificar = new frmAlta(artic); // el nuevo constructor pasa los datos del actual elemento modificar.ShowDialog(); cargar(); }