private void button3_Click(object sender, EventArgs e) { AdmPro ac = new AdmPro(); if (dgv.SelectedRows.Count > 0) { ac.txtid.Text = dgv.CurrentRow.Cells[1].Value.ToString(); ac.txtcodigo.Text = dgv.CurrentRow.Cells[2].Value.ToString(); ac.txtdescripc.Text = dgv.CurrentRow.Cells[3].Value.ToString(); ac.txtexistencia.Text = dgv.CurrentRow.Cells[4].Value.ToString(); ac.txtcatiui.Text = dgv.CurrentRow.Cells[5].Value.ToString(); ac.combouni.Text = dgv.CurrentRow.Cells[6].Value.ToString(); ac.txtbodega.Text = dgv.CurrentRow.Cells[7].Value.ToString(); ac.txtlote.Text = dgv.CurrentRow.Cells[8].Value.ToString(); ac.txtprecon.Text = dgv.CurrentRow.Cells[9].Value.ToString(); ac.date12.Text = dgv.CurrentRow.Cells[10].Value.ToString(); ac.txtmarca.Text = dgv.CurrentRow.Cells[11].Value.ToString(); ac.MdiParent = MdiParent; ac.Show(); this.Close(); } else { MessageBox.Show("Debe de Seleccionar una Fila", "Atencion!!!", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void button1_Click(object sender, EventArgs e) { AdmPro pro = new AdmPro(); pro.MdiParent = this; pro.Show(); }