///parentList 为父级节点
///list为所有节点
private List<Menu> GetMenuNodes(List<Menu> parentList, List<Menu> list)
{
var newList = new List<Menu>();
foreach (var a in parentList)
{
newList.Add(a);
var childList = list.Where(o => o.PID == a.ID).OrderBy(o => o.Ol_Tax).ToList();
foreach (var b in childList)
{
newList.Add(b);
}
if (childList.Count > 0) GetMenuNodes(childList, list);
}
return newList;
}