Ejemplo n.º 1
0
        private void FormTrangChu_Load(object sender, EventArgs e)
        {
            FormDangNhap fDangNhap = new FormDangNhap();

            fDangNhap.ShowDialog();
            //Phan quyen user
            if (ThongTin.NhanVienDTO.LoaiNhanVien == 1)
            {
                DonHang_barButtonItem.Visibility = BarItemVisibility.Never;

                SanPham_ribbonPageGroup.Visible = false;

                ConNguoi_ribbonPageGroup.Visible = false;

                DonHang_ribbonPage.Visible = false;

                LoaiPhieuXuat_barButtonItem.Visibility = BarItemVisibility.Never;

                SanPham_ribbonPage.Visible = false;

                ThanhVien_ribbonPage.Visible = false;

                NhanVien_ribbonPage.Visible = false;

                ThamSo_barButtonItem.Visibility = BarItemVisibility.Never;
            }
            else
            {
                DonHang_barButtonItem.Visibility = BarItemVisibility.Always;

                SanPham_ribbonPageGroup.Visible = true;

                ConNguoi_ribbonPageGroup.Visible = true;

                DonHang_ribbonPage.Visible = true;

                LoaiPhieuXuat_barButtonItem.Visibility = BarItemVisibility.Always;

                SanPham_ribbonPage.Visible = true;

                ThanhVien_ribbonPage.Visible = true;

                NhanVien_ribbonPage.Visible = true;

                ThamSo_barButtonItem.Visibility = BarItemVisibility.Always;
            }
        }
Ejemplo n.º 2
0
        private void FormManHinhChinh_Load(object sender, EventArgs e)
        {
            FormDangNhap fDangNhap = new FormDangNhap();

            fDangNhap.ShowDialog();
            if (ThongTin.NhanVienDTO.LoaiNhanVien == 1)
            {
                donHangToolStripMenuItem.Enabled = false;
                xuatHangToolStripMenuItemQLLoaiPhieuXuat.Enabled = false;
                sanPhamToolStripMenuItem.Enabled               = false;
                thanhVienToolStripMenuItem.Enabled             = false;
                nhanVienToolStripMenuItem.Enabled              = false;
                heThongToolStripMenuItemQLThamSo.Visible       = false;
                heThongToolStripMenuItemSLDuLieu.Visible       = false;
                heThongToolStripMenuItemPHDuLieu.Visible       = false;
                heThongToolStripMenuItemCauHinhThietBi.Visible = false;
                heThongToolStripMenuItemCauHinhPhanMem.Visible = false;
                heThongToolStripMenuItemQLDuLieuXoa.Visible    = false;
            }
        }