예제 #1
0
        public ActionResult RemoveItem(int photo_id)
        {
            int id = userRepo.GetUserId(User.Identity.Name);

            if (id != null)
            {
                int i = cartRepo.removeItem(id, photo_id);
                if (i >= 1)
                {
                    photorepo.IncreaseQuantity(photo_id);
                    return(RedirectToAction("CartData"));
                }
                else
                {
                    return(RedirectToAction("CartData"));
                }
            }
            else
            {
                return(RedirectToAction("CartData"));
            }
        }