Example #1
0
        private void GetChildCategoryModuleList(TreeNode nd)
        {
            //根据物料父分类ID查找是否包含子分类
            List <Model.BusinessCategoryModule> childCategoryModuleList
                = MaterialModuleBLL.GetCategoryModuleListByParentId(nd.Name);

            if (childCategoryModuleList.Count > 0)
            {
                childCategoryModuleList.ForEach((s) =>
                {
                    TreeNode nod = new TreeNode();
                    nod.Text     = s.CategoryName;
                    nod.Tag      = nd.Tag;
                    nod.Name     = s.CategoryId;
                    nod.ImageKey = "class";

                    GetChildCategoryModuleList(nod);

                    nd.Nodes.Add(nod);
                }
                                                );
            }
        }