IT
private void InitTree(TreeNodeCollection Nds, string parentId)
    {
        TreeNode tmpNd;
        IList<ProClass> rows = ProClassService.SelectParent(int.Parse(parentId));
        foreach (ProClass row in rows)
        {
            tmpNd = new TreeNode();
            tmpNd.Value = row.ID.ToString();
            tmpNd.Text = row.Name;
            tmpNd.NavigateUrl = "Product_list.aspx?ProClassId=" + tmpNd.Value;
            Nds.Add(tmpNd);
            if (row.IsLeaf != "1")
                InitTree(tmpNd.ChildNodes, tmpNd.Value);
        }
    }
posted on 2010-06-28 12:16  liufei  阅读(126)  评论(0编辑  收藏  举报