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