Example #1
0
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            panel3.Visible = true;
            panel1.Width   = 810;
            panel1.Height  = 659;
            string madocgia = dataGridView1.CurrentRow.Cells[0].Value.ToString();
            DocGia dg       = new DocGia();
            string gioitinh = dg.loadgioitinh(madocgia);

            if (gioitinh == "Nam")
            {
                rbtnNam.Checked = true;
            }
            else
            {
                rbtnNu.Checked = true;
            }
            cbbTenDocGia.Text = dg.loadtendocgia(madocgia);
            cbbMaDocGia.Text  = madocgia;
            cbbLoaiDG.Text    = dg.loadloaidocgia(madocgia);
            txtNgaySinh.Text  = dg.loadngaysinh(madocgia);
            txtDiaChi.Text    = dg.loaddiachi(madocgia);
            txtSDT.Text       = dg.loadsodienthoai(madocgia);
            txtNgayTao.Text   = dg.loadngaytao(madocgia);
            txtEmail.Text     = dg.loademail(madocgia);
            pictureBox2.Image = byteArrayToImage(dg.loadAnhQR(cbbMaDocGia.Text));
            pictureBox1.Image = byteArrayToImage(dg.loadAnhDocGia(cbbMaDocGia.Text));
        }