예제 #1
0
 /// <summary>
 /// 从购物车移除
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public ActionResult RemoveFromCart(string id)
 {
     Business.Sys_FlowerShopCart bus  = new Business.Sys_FlowerShopCart();
     Model.FlowerShopCart        Cart = bus.GetFlowerShopCartById(id);
     if (Cart != null)
     {
         bus.DeleteFlowerShopCart(Cart.Id.ToString());//
     }
     return(Json(new { code = 1 }, JsonRequestBehavior.AllowGet));
 }
예제 #2
0
        public ActionResult IncreaseOrDecreaseOne(string id, int quantity)
        {
            Business.Sys_FlowerShopCart bus  = new Business.Sys_FlowerShopCart();
            Model.FlowerShopCart        Cart = bus.GetFlowerShopCartById(id);
            if (Cart != null)
            {
                Cart.Num        = quantity;
                Cart.UpdateTime = DateTime.Now;

                bus.UpdateFlowerShopCart(Cart);//原来有这个商品,更新下数量
            }
            return(Json(new
            {
                msg = true
            }));
        }