// GET: 购物车首页 public ActionResult ShopCarIndex() { //商品图片 ViewBag.GoodsPhoto = GoodsPhotoBll.SelectAllGoodsPhoto(); //查询当前用户与购物车中的商品的收藏关系 ViewBag.UserCollection = CollectionBll.SelectUserCollection(Convert.ToInt32(Session["userid"])); //查询当前用户所有购物车信息 return(View(ShopingCarBll.SelectAllShopCar(Convert.ToInt32(Session["userid"])))); }
/// <summary> /// 我的收藏分布视图 /// </summary> /// <returns></returns> public ActionResult MyCollection() { List <CollectionTable> list = CollectionBll.SelectUserCollection(Convert.ToInt32(Session["userid"])).Where(p => p.IsCollection == 1).ToList(); return(PartialView("MyCollection", list)); }