转成LinQ的方法
                List<M_IW000522_SpecialDiscount> updateList = new List<M_IW000522_SpecialDiscount>();
                List<M_IW000522_SpecialDiscount> insertList = new List<M_IW000522_SpecialDiscount>();


                foreach (var d in items)
                {
                    foreach (var data in listDiscount)
                    {
                        if (data.MaterialCode == d.MaterialCode)
                        {
                            d.ID = data.ID;
                            d.CreatedDate = DateTime.Now;
                            d.CreatedBy = WebEngine.CurrentUser.ADAccount;
                            updateList.Add(d);
                        }
                    }
                }


                foreach (var d in items)
                {
                    if (listDiscount.Where(x => x.MaterialCode == d.MaterialCode).Count() == 0)
                    {
                        d.CreatedDate = DateTime.Now;
                        d.CreatedBy = WebEngine.CurrentUser.ADAccount;
                        insertList.Add(d);
                    }
                }
