Example #1
0
        public List <dynamic> GetBoomTree2(string PartCode)
        {
            var            list  = new PMS_BN_PartFileService().GetBom(PartCode);
            List <dynamic> list2 = new List <dynamic>();

            foreach (var item in list)
            {
                list2.Add(new { id = item.PartCode, pid = item.ParentCode, text = item.PartName });
            }
            return(list2);
        }
Example #2
0
        public List <dynamic> GetBoomTree(string PartCode, string ContractCode, string ProductName)
        {
            var list        = new PMS_BN_PartFileService().GetBom(PartCode);
            var notShowList = new MES_BN_MatchingTableDetailService().GetNotShowBom(PartCode, ContractCode, ProductName, "1");

            foreach (var item in notShowList)
            {
                var part = (from p in list where p.PartCode == item select p).FirstOrDefault();
                if (part != null)
                {
                    list.Remove(part);
                }
            }
            List <dynamic> list2 = new List <dynamic>();

            foreach (var item in list)
            {
                list2.Add(new { id = item.PartCode, pid = item.ParentCode, text = item.PartCode + " " + item.PartName });
            }
            return(list2);
        }