private void btnAgregar_Click(object sender, EventArgs e) { frmAltaModifProducto altaProd = new frmAltaModifProducto(); altaProd.ShowDialog(); cargarGrilla(); }
private void btnModificar_Click(object sender, EventArgs e) { if (dgvProductos.CurrentRow != null) { Producto pmodif = (Producto)dgvProductos.CurrentRow.DataBoundItem; frmAltaModifProducto modif = new frmAltaModifProducto(pmodif); modif.ShowDialog(); cargarGrilla(); } else { MessageBox.Show("No hay ningún producto seleccionado", "Cuidado!"); } }