public override void Consultar() { Consulta_de_productos formconpro = new Consulta_de_productos { MdiParent = this.MdiParent }; formconpro.Show(); }
private void ProductoToolStripMenuItem_Click(object sender, EventArgs e) { Consulta_de_productos formconsultapro = new Consulta_de_productos { MdiParent = this }; formconsultapro.Show(); }
//seleccion de clientes a traves del formulario de productos private void Btproductos_Click(object sender, EventArgs e) { Consulta_de_productos formconpro = new Consulta_de_productos(); MdiParent = this.MdiParent; formconpro.ShowDialog(); if (formconpro.DialogResult == DialogResult.OK) { txtcodigoproducto.Text = formconpro.dg1.Rows[formconpro.dg1.CurrentRow.Index].Cells[0].Value.ToString(); txtdescripcion.Text = formconpro.dg1.Rows[formconpro.dg1.CurrentRow.Index].Cells[1].Value.ToString(); txtprecio.Text = formconpro.dg1.Rows[formconpro.dg1.CurrentRow.Index].Cells[2].Value.ToString(); txtcantidad.Focus(); } }