Exemplo n.º 1
0
        public void showDuLieuNV()
        {
            gridViewNV.Rows.Clear();

            DataTable dt = ey.LoadNV();

            foreach (DataRow d in dt.Rows)
            {
                int n = gridViewNV.Rows.Add();
                gridViewNV.Rows[n].Cells[0].Value = false;
                gridViewNV.Rows[n].Cells[1].Value = d["MaNhanVien"].ToString();
                gridViewNV.Rows[n].Cells[2].Value = d["HoTen"].ToString();
                gridViewNV.Rows[n].Cells[3].Value = d["ID"].ToString();
                gridViewNV.Rows[n].Cells[4].Value = d["GioiTinh"].ToString();
                gridViewNV.Rows[n].Cells[5].Value = d["MaCapQuanLi"].ToString();
                gridViewNV.Rows[n].Cells[6].Value = d["MaNguoiQuanLi"].ToString();
            }
            gridViewNV.Refresh();
        }
Exemplo n.º 2
0
 private void btnHienThiNV_Click(object sender, EventArgs e)
 {
     dataNV.Update();
     dataNV.Refresh();
     dataNV.DataSource = em.LoadNV(Convert.ToInt32(labelSelect.Text));
 }