Ejemplo n.º 1
0
        public ActionResult List(string condition)
        {
            List <GoodsModel> modelList = new List <GoodsModel>();

            foreach (var item in _goodsBLL.GetGoodsByCondition(condition))
            {
                GoodsModel gm = new GoodsModel(item);
                gm.PicturePath = _goodsImagesBLL.GetPictureByGoodsId(item.Id).ImagePath;
                gm.IsRecommend = _recommendBLL.IsRecommend(gm.Id);

                modelList.Add(gm);
            }

            ViewData["GoodsList"] = modelList;
            return(View());
        }