public Form1()
{
InitializeComponent();
}
List<Orag> list = new List<Orag>();
private void Form1_Load(object sender, EventArgs e)
{
list = new List<Orag> {
new Orag(1, 0, "上海公司"),
new Orag(2, 0, "北京公司"),
new Orag(3, 1, "上海公司1"),
new Orag(4, 2, "上海公司2"),
new Orag(5, 3, "上海公司2-1"),
new Orag(6, 4, "北京公司0"),
new Orag(7, 5, "北京公司1"),
new Orag(8, 6, "北京公司2"),
new Orag(9, 2, "北京公司3") };
Addnode();
}
public void Addnode()
{
for (int i = 0; i < list.Count; i++)
{
if (list[i].pid == 0)
{
TreeNode pnode = new TreeNode();
public Form1() { InitializeComponent(); } List<Orag> list = new List<Orag>(); private void Form1_Load(object sender, EventArgs e) { list = new List<Orag> { ..