/// <summary> /// 加载仓库类别节点 /// </summary> /// <param name="list"></param> /// <param name="pNode"></param> public static void AddTvSTypesNode(List <StoreTypeInfoModel> list, TreeNode pNode) { foreach (StoreTypeInfoModel type in list) { TreeNode node = FormUtility.CreateNode(type.STypeId.ToString(), type.STypeName); pNode.Nodes.Add(node); } }
/// <summary> /// 递归加载商品类别节点 /// </summary> /// <param name="list"></param> /// <param name="pNode"></param> /// <param name="pId"></param> public static void AddTvGTypesNode(List <GoodsTypeInfoModel> list, TreeNode pNode, int pId) { var pList = list.Where(ut => ut.ParentId == pId); foreach (GoodsTypeInfoModel gt in pList) { TreeNode node = FormUtility.CreateNode(gt.GTypeId.ToString(), gt.GTypeName); pNode.Nodes.Add(node); AddTvGTypesNode(list, node, gt.GTypeId); } }