예제 #1
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            NhanVienDAL       nhanVienDAL     = new NhanVienDAL();
            NHAN_VIEN         nv              = nhanVienDAL.GetDVByUsername(this.username);
            nhanVienNhomDAL   nhanVienNhomDAL = new nhanVienNhomDAL();
            NHAN_VIEN_NHOM    nvn             = nhanVienNhomDAL.GetDVByMaNV(nv.MA_NV);
            phanQuyenDAL      phanQuyenDAL    = new phanQuyenDAL();
            List <PHAN_QUYEN> pq              = phanQuyenDAL.GetListBuNhom(nvn.MA_NHOM);

            foreach (NavBarGroup nav in navBarControl.Groups)
            {
                if (nav is NavBarGroup)
                {
                    nav.Visible = find(Int32.Parse(nav.Tag.ToString()), pq);
                }
            }
        }