日期:2014-05-20 浏览次数:20717 次
public class Group
{
/// <summary>
/// 编号
/// </summary>
public string ID {get;set;}
/// <summary>
/// 父级编号
/// </summary>
public string ParentID{get;set;}
/// <summary>
/// 等级
/// </summary>
public int Levels{get;set;}
/// <summary>
/// 次数
/// </summary>
public int Num{get;set;}
/// <summary>
/// 排名
/// </summary>
public int No{get;set;}
}
List<Group> list = new List<Group>();
list.Add(new Group { Id = "01", ParentID = "-1", Levels = "-1",Num=21 });
list.Add(new Group { Id = "02", ParentID = "01", Levels = "1",Num=5 });
list.Add(new Group { Id = "04", ParentID = "02", Levels = "2",Num=1 });
list.Add(new Group { Id = "05", ParentID = "02", Levels = "2",Num=4 });
list.Add(new Group { Id = "03", ParentID = "01", Levels = "1",Num=16 });
list.Add(new Group { Id = "06", ParentID = "03", Levels = "2",Num=10 });
list.Add(new Group { Id = "07", ParentID = "03", Levels = "2",Num=3 });
list.Add(new Group { Id = "08", ParentID = "03", Levels = "2",Num=3 });