private void checkBtnQTV_CheckedChanged(object sender, EventArgs e)
 {
     if (checkBtnQTV.Checked && this.Parent != null)
     {
         ucPhanQuyen _ucPhanQuyen = this.Parent as ucPhanQuyen;
         if (_ucPhanQuyen.showGroup(false))
         {
             checkBtnGroup.Checked = !checkBtnQTV.Checked;
         }
         else
         {
             checkBtnQTV.Checked = false;
         }
     }
 }
Example #2
0
        private void init()
        {
            //Hiện tên người dùng
            if (Global.current_quantrivien_login != null)
            {
                if (Global.current_quantrivien_login.hoten != null)
                    barBtnUser.Caption = Global.current_quantrivien_login.hoten;
                else
                    barBtnUser.Caption = "[Unknown]";
            }

            //Việt hóa
            DevExpress.XtraGrid.Localization.GridLocalizer.Active = new MyGridLocalizer();
            DevExpress.XtraTreeList.Localization.TreeListLocalizer.Active = new MyTreeListLocalizer();
            DevExpress.XtraEditors.Controls.Localizer.Active = new MyLocalizer();

            _ucPhanQuyen = new ucPhanQuyen();
            _ucQuanLyPhong = new ucQuanLyPhong();

            _ucQuanLyPhong.loadDataByPhong = new ucQuanLyPhong.LoadDataByPhong(loadDataByPhong);

            _ucQuanLyPhongThietBi = new ucQuanLyPhongThietBi();
            _ucQuanLyViTri = new ucQuanLyViTri();
            _ucQuanLyNhanVien = new ucQuanLyNhanVien();
            _ucQuanLyThietBi = new ucQuanLyThietBi();
            _ucQuanLyLoaiTB = new ucQuanLyLoaiTB();
            _ucTK_SLTB_TheoTinhTrang = new ThongKe.ucTK_SLTB_TheoTinhTrang();
            _ucQuanLyTinhTrang = new ucQuanLyTinhTrang();
            _ucQuanLySuCo = new ucQuanLySuCo();
            _ucPhanCongQTV = new ucPhanCongQTV();
            _ucLogHeThong = new ucLogHeThong();

            //UserLookAndFeel.Default.SetSkinStyle(Properties.Settings.Default.skin);
            //DockStyle
            _ucPhanQuyen.Dock = DockStyle.Fill;
            _ucQuanLyPhong.Dock = DockStyle.Fill;
            _ucQuanLyPhongThietBi.Dock = DockStyle.Fill;
            _ucQuanLyViTri.Dock = DockStyle.Fill;
            _ucQuanLyNhanVien.Dock = DockStyle.Fill;
            _ucQuanLyThietBi.Dock = DockStyle.Fill;
            _ucQuanLyLoaiTB.Dock = DockStyle.Fill;
            _ucTK_SLTB_TheoTinhTrang.Dock = DockStyle.Fill;
            _ucQuanLySuCo.Dock = DockStyle.Fill;
            _ucPhanCongQTV.Dock = DockStyle.Fill;
            _ucQuanLyTinhTrang.Dock = DockStyle.Fill;
            _ucLogHeThong.Dock = DockStyle.Fill;
            //Add RibbonPage
            //addRibbonPage(_ucThongKeChiTiet.getRibbon());
            //addRibbonPage(_ucThongKeTongQuat.getRibbon());
            addRibbonPage(_ucQuanLyViTri.getRibbon());
            addRibbonPage(_ucQuanLyPhong.getRibbon());
            addRibbonPage(_ucQuanLyPhongThietBi.getRibbon());
            addRibbonPage(_ucQuanLyThietBi.getRibbon());
            addRibbonPage(_ucQuanLyLoaiTB.getRibbon());
            addRibbonPage(_ucQuanLyNhanVien.getRibbon());
            addRibbonPage(_ucPhanCongQTV.getRibbon());
            addRibbonPage(_ucQuanLyTinhTrang.getRibbon());
            addRibbonPage(_ucQuanLySuCo.getRibbon());
            addRibbonPage(_ucTK_SLTB_TheoTinhTrang.getRibbon());
            addRibbonPage(_ucPhanQuyen.getRibbon());

            addRibbonPage(_ucLogHeThong.getRibbon());
            drawEnd = true;
            ribbonMain.SelectedPage = ribbonMain.Pages.GetPageByName("rbnPageThongKe_Home");
            ribbonMain.SelectedPage = ribbonMain.Pages.GetPageByName("rbnPageViTri_Home");
            backstageViewControl1.SelectedTabIndex = 7;
            ThongTinPhanMem();
        }