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();

            _ucQuanLyViTri = new ucQuanLyViTri();
            _ucQuanLyPhong = new ucQuanLyPhong();
            _ucQuanLyPhong.selectPageDonViTaiSan = new ucQuanLyPhong.SelectPageDonViTaiSan(SelectPageDonViTaiSan);
            _ucQuanLyDonVi  = new ucQuanLyDonVi();
            _ucQuanLyLoaiTS = new ucQuanLyLoaiTS();
            //_ucQuanLyTaiSan = new ucQuanLyTaiSan();
            _ucQuanLyDonVi_TaiSan = new ucQuanLyDonVi_TaiSan();
            //_ucPhanQuyen = new ucPhanQuyen();
            _ucThongKe = new ucThongKe();
            //_ucLogHeThong = new ucLogHeThong();

            _ucQuanLyViTri.Dock  = DockStyle.Fill;
            _ucQuanLyPhong.Dock  = DockStyle.Fill;
            _ucQuanLyDonVi.Dock  = DockStyle.Fill;
            _ucQuanLyLoaiTS.Dock = DockStyle.Fill;
            //_ucQuanLyTaiSan.Dock = DockStyle.Fill;
            _ucQuanLyDonVi_TaiSan.Dock = DockStyle.Fill;
            //_ucPhanQuyen.Dock = DockStyle.Fill;
            _ucThongKe.Dock = DockStyle.Fill;
            //_ucLogHeThong.Dock = DockStyle.Fill;

            addRibbonPage(_ucQuanLyViTri.getRibbonControl());
            addRibbonPage(_ucQuanLyPhong.getRibbonControl());
            addRibbonPage(_ucQuanLyDonVi.getRibbonControl());
            addRibbonPage(_ucQuanLyLoaiTS.getRibbonControl());
            //addRibbonPage(_ucQuanLyTaiSan.getRibbonControl());
            addRibbonPage(_ucQuanLyDonVi_TaiSan.getRibbonControl());
            //addRibbonPage(_ucPhanQuyen.getRibbonControl());
            addRibbonPage(_ucThongKe.getRibbonControl());
            //addRibbonPage(_ucLogHeThong.getRibbonControl());

            drawEnd = true;
            ribbonMain.SelectedPage = ribbonMain.Pages.GetPageByName(rbnPageLoaiTS);
            ribbonMain.SelectedPage = ribbonMain.Pages.GetPageByName(rbnPageViTri);
            BackstageHideAllOnlyShowThongTinPhanMem();
            ThongTinPhanMem();
        }
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();
        }