コード例 #1
0
ファイル: MenuBar.cs プロジェクト: shiroh10/X-O-Genesis
        void masterController_EmployeeLogin(object sender, EmployeeArgs e)
        {
            MenuList list;
            Menu     menu;

            if (e.employee.Position == UserLevel.ADMIN)
            {
                list = new AdminMenuList(masterController, this);
                menu = Menu.Home;
            }
            else if (e.employee.Position == UserLevel.CASHIER)
            {
                list = new UserMenuList(masterController, this);
                menu = Menu.POS;
            }
            else if (e.employee.Position == UserLevel.STAFF)
            {
                list = new StaffMenuList(masterController, this);
                menu = Menu.Client;
            }
            else
            {
                list = new InventoryPersonnelMenuList(masterController, this);
                menu = Menu.Inventory;
            }

            accessMenuControl = list.getList;
            masterController.appearSideAndSubBar();
            initControlLocation();
            selectControlbyName(menu);
        }
コード例 #2
0
ファイル: MenuBar.cs プロジェクト: am0rphyst/X-O-Genesis
        void masterController_EmployeeLogin(object sender, EmployeeArgs e)
        {
            MenuList list;
            Menu menu;

            if (e.employee.Position == UserLevel.ADMIN)
            {
                list = new AdminMenuList(masterController, this);
                menu = Menu.Home;
            }
            else if (e.employee.Position == UserLevel.CASHIER)
            {
                list = new UserMenuList(masterController, this);
                menu = Menu.POS;
            }
            else if (e.employee.Position == UserLevel.STAFF)
            {
                list = new StaffMenuList(masterController, this);
                menu = Menu.Client;
            }else{
                list = new InventoryPersonnelMenuList(masterController, this);
                menu = Menu.Stock_Control;
            }

            accessMenuControl = list.getList;
            masterController.appearSideAndSubBar();
            initControlLocation();
            selectControlbyName(menu);
            initColor();
        }