private void Btn_BuscarTipoTransporte_Click(object sender, EventArgs e) { ConsultClientes concep = new ConsultClientes(); concep.ShowDialog(); if (concep.DialogResult == DialogResult.OK) { Txt_2.Text = concep.Dgv_consulta1.Rows[concep.Dgv_consulta1.CurrentRow.Index]. Cells[0].Value.ToString(); } }
private void Btn_consultar_Click(object sender, EventArgs e) { ConsultClientes concep = new ConsultClientes(); concep.ShowDialog(); if (concep.DialogResult == DialogResult.OK) { Txt_1.Text = concep.Dgv_consulta1.Rows[concep.Dgv_consulta1.CurrentRow.Index]. Cells[0].Value.ToString(); Txt_2.Text = concep.Dgv_consulta1.Rows[concep.Dgv_consulta1.CurrentRow.Index]. Cells[1].Value.ToString(); Txt_3.Text = concep.Dgv_consulta1.Rows[concep.Dgv_consulta1.CurrentRow.Index]. Cells[2].Value.ToString(); Txt_4.Text = concep.Dgv_consulta1.Rows[concep.Dgv_consulta1.CurrentRow.Index]. Cells[3].Value.ToString(); Txt_5.Text = concep.Dgv_consulta1.Rows[concep.Dgv_consulta1.CurrentRow.Index]. Cells[4].Value.ToString(); Txt_6.Text = concep.Dgv_consulta1.Rows[concep.Dgv_consulta1.CurrentRow.Index]. Cells[5].Value.ToString(); Cbo_estado.Text = concep.Dgv_consulta1.Rows[concep.Dgv_consulta1.CurrentRow.Index]. Cells[6].Value.ToString(); } }