Beispiel #1
0
        private DataTable GetMenuItems(string userLogon, string application)
        {
            MainMenuDAO mainMenuDao = new MainMenuDAO();

            DataTable allMenus = mainMenuDao.GetMenus(userLogon, application);

            HttpContext.Current.Session["Menu"] = allMenus;

            return(allMenus);
        }
Beispiel #2
0
        private Dictionary <decimal, List <MainMenuDto> > GetMenuItems(string userLogon, string application)
        {
            MainMenuDAO mainMenuDao = new MainMenuDAO();

            var configSection = FeatureToggleConfigSection.GetConfig();

            var pagesByParent = mainMenuDao
                                .GetMenus(userLogon, application)
                                .Where(menu => configSection.IsPageEnabledForUser(userLogon, menu.Url))
                                .GroupBy(m => m.Parent_Id)
                                .ToDictionary(grp => grp.Key, grp => grp.ToList());

            return(pagesByParent);
        }