private void buttonModificar_Click(object sender, RoutedEventArgs e) { ModificarVenta mv = new ModificarVenta(); mv.Show(); Close(); }
private void btnModificar_Click(object sender, EventArgs e) { //MODIFICO STOCK var seleccionados = dgvVentas.SelectedRows; if (seleccionados.Count == 0 || seleccionados.Count > 1) { MessageBox.Show("Deberia seleccionar una fila"); return; } foreach (DataGridViewRow fila in seleccionados) { var id = fila.Cells[0].Value; var idCli = fila.Cells[2].Value; var ventana = new ModificarVenta(id.ToString(), idCli.ToString()); ventana.ShowDialog(); cargarVentas(); } }