Пример #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            Frm_vistDepartamento dep = new Frm_vistDepartamento();

            dep.ShowDialog();

            if (dep.DialogResult == DialogResult.OK)
            {
                txt_departamento.Text = dep.Dgv_consulta.Rows[dep.Dgv_consulta.CurrentRow.Index].
                                        Cells[0].Value.ToString();
            }
        }
Пример #2
0
        private void Btn_consultar_Click(object sender, EventArgs e)
        {
            Frm_vistDepartamento concep = new Frm_vistDepartamento();

            concep.ShowDialog();

            if (concep.DialogResult == DialogResult.OK)
            {
                Txt_Cod.Text = concep.Dgv_consulta.Rows[concep.Dgv_consulta.CurrentRow.Index].
                               Cells[0].Value.ToString();
                Txt_nombre.Text = concep.Dgv_consulta.Rows[concep.Dgv_consulta.CurrentRow.Index].
                                  Cells[1].Value.ToString();
            }
        }