private void dgvNhanVien_Click(object sender, EventArgs e) { if (dgvNhanVien.SelectedRows.Count > 0) { //Load Sơ yếu lý lịch DataGridViewRow dgvRow = dgvNhanVien.SelectedRows[0]; lblMaNV.Text = dgvRow.Cells["MaNV"].Value.ToString(); txtHo.Text = dgvRow.Cells["HoLot"].Value.ToString(); txtTen.Text = dgvRow.Cells["Ten"].Value.ToString(); txtCMND.Text = dgvRow.Cells["CMND"].Value.ToString(); if (Convert.ToBoolean(dgvRow.Cells["GioiTinh"].Value) == true) { rdbNam.Checked = true; } else { rdbNu.Checked = true; } dtpNgaySinh.Value = Convert.ToDateTime(dgvRow.Cells["NgaySinh"].Value); txtDienThoai.Text = dgvRow.Cells["DienThoai"].Value.ToString(); picHinhAnhNV.Image = MyConvert.BinaryToImage((byte[])dgvRow.Cells["HinhAnh"].Value); txtDiaChi.Text = dgvRow.Cells["DiaChi"].Value.ToString(); //Load Trình độ, Bộ phận, Chức vụ, Tình trạng cbxTrinhDo.SelectedValue = dgvRow.Cells["MaTrinhDo"].Value; cbxBoPhan.SelectedValue = dgvRow.Cells["MaBP"].Value; cbxChucVu.SelectedValue = dgvRow.Cells["MaChucVu"].Value; if (Convert.ToBoolean(dgvRow.Cells["DaThoiViec"].Value) == true) { rdbDaThoiViec.Checked = true; } else { rdbDangLam.Checked = true; } //Load Bảo hiểm lstBaoHiem = BaoHiemBUL.Load(Convert.ToInt32(lblMaNV.Text)); if (lstBaoHiem != null) { lblClickDeThemBaoHiem.Visible = false; dgvBaoHiem.DataSource = typeof(List <BAOHIEM>); dgvBaoHiem.DataSource = lstBaoHiem; CustomDataGridViewBaoHiem(); } else { lstBaoHiem = new List <BAOHIEM>(); lblClickDeThemBaoHiem.Visible = true; dgvBaoHiem.DataSource = null; } } }