Esempio n. 1
0
        public void GetGoods(TreeNode node, testDirectoryModel Parent)
        {
            //node.Nodes.Clear();



            foreach (testDirectoryModel item in testDirectoryModel.GetDicGoods.Where(n => n.NumDepth == i).Where(n => n.ParentID == Parent.ParentID))
            {
                foreach (string s in getNomID_dic_goods_grp(item.ID))
                {
                    testDirectoryModel.AddDicGoods(new testDirectoryModel(s, item.ID, getNomNameFromID(s), i + 1));
                }
            }

            i++;

            foreach (testDirectoryModel s in testDirectoryModel.GetDicGoods.Where(n => n.NumDepth == i) /*.Where(n => n.ParentID == Parent.ParentID)*/)
            {
                TreeNode drive = new TreeNode($"({s.ParentID}):" + s.FullName + $"({s.ID}):{s.NumDepth}", 0, 0);
                node.Nodes.Add(drive);
            }
        }
Esempio n. 2
0
 public static void AddDicGoods(testDirectoryModel testDirectoryModel)
 {
     _testDirectoryModel.Add(testDirectoryModel);
 }