예제 #1
0
        private static void InitMenus()
        {
            _menus = new List <Menus>();

            Hashtable table = Sys_MenusDal.Search(0, 100, "SortIndex", "ASC", " and a.ParentID=0");

            DataTable dt = (DataTable)table["data"];

            List <Menus> dbMenus = ModelConvertHelper <Menus> .ConvertToModel(dt).ToList(); //PageBase.DB.Menus.Include(m => m.ViewPower).OrderBy(m => m.SortIndex).ToList();

            ResolveMenuCollection(dbMenus, "0", 0);
        }
예제 #2
0
        public static List <Menus> TopMenus(string userName)
        {
            _topMenus = new List <Menus>();


            Hashtable table = Sys_MenusDal.SearchForTopMenus(0, 100, "SortIndex", "ASC", "and  pu.ID=" + Convert.ToInt32(userName));

            DataTable dt = (DataTable)table["data"];

            _topMenus = ModelConvertHelper <Menus> .ConvertToModel(dt).ToList(); //PageBase.DB.Menus.Include(m => m.ViewPower).OrderBy(m => m.SortIndex).ToList();

            return(_topMenus);
        }