private void btnModificar_Click(object sender, EventArgs e) { Articulos articulos = (Articulos)dgvArticulos.CurrentRow.DataBoundItem; ArticulosModificar artMod = new ArticulosModificar(articulos); this.Hide(); artMod.Show(); }
private void btnModificarArt_Click(object sender, EventArgs e) { Articulos articulo = (Articulos)cbxArticulos.SelectedItem; ArticulosModificar ventana = new ArticulosModificar(articulo); ventana.ShowDialog(); Articulos aux; aux = (Articulos)cbxArticulos.SelectedItem; txtPrecio.Text = aux.Pu.ToString(); txtStock.Text = aux.Stock.ToString(); txtCompra.Text = aux.PuCompra.ToString(); }