private void productoToolStripMenuItem_Click(object sender, EventArgs e) { ConsultarProductos ConClick = new ConsultarProductos(); ConClick.MdiParent = this; ConClick.Show(); }
private void btnProductos_Click(object sender, EventArgs e) { ConsultarProductos conPro = new ConsultarProductos(); conPro.ShowDialog(); if (conPro.DialogResult == DialogResult.OK) { txtCodigoProducto.Text = conPro.dataGridView1.Rows[conPro.dataGridView1.CurrentRow.Index].Cells[0].Value.ToString(); txtDescripcion.Text = conPro.dataGridView1.Rows[conPro.dataGridView1.CurrentRow.Index].Cells[1].Value.ToString(); txtPrecio.Text = conPro.dataGridView1.Rows[conPro.dataGridView1.CurrentRow.Index].Cells[2].Value.ToString(); txtCantidad.Focus(); } }