/// <summary> /// 生成包含层级关系的子节点列表 /// </summary> /// <returns></returns> public IEnumerable <System_Menu> GetChildListMenu() { List <System_Menu> allMenus = instance.GetAll(); IEnumerable <System_Menu> root = allMenus.Where(o => o.Menu_PCode == "root"); foreach (var d in root) { GenerateChild(d, allMenus); } return(root); }
public IEnumerable <System_Menu> GetChildListDept() { List <System_Menu> allMenus = instance.GetAll(); IEnumerable <System_Menu> root = allMenus.Where(o => string.IsNullOrEmpty(o.Menu_PCode)); foreach (var d in root) { GenerateChild(d, allMenus); } return(root); }
/// <summary> /// 获取所有的信息 /// </summary> /// <returns>list</returns> public List <System_Menu> GetAll() { List <System_Menu> list = instance.GetAll(); return(list); }