/// <summary> /// 查询用户所属的菜单信息 /// </summary> /// <param name="userno">用户编码</param> /// <returns></returns> public List <sysmenu> QueryUserMenus(string userno) { SysUserDal dal = new SysUserDal(); List <sysmenu> menus = dal.QueryMenus(userno); var topmenus = menus.Where(p => p.parentno == "0"); foreach (sysmenu menu in menus) { BuildMenusTree(menus, menu); } return(topmenus.ToList()); }