コード例 #1
0
        //______________________________________________________________________________________

        /// <summary>
        /// Product/Cart
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>

        public ActionResult DecrementQuantityFront(int id)
        {
            try
            {
                ShoppingCartImplementation.ReduceFromCart(id, @User.Identity.Name);
                return(RedirectToAction("Index", "Product"));
            }
            catch (Exception ex)
            {
                return(RedirectToAction("Index", "Product"));
            }
        }
コード例 #2
0
        //______________________________________________________________________________________

        /// <summary>
        /// Product/Cart
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>

        public ActionResult DecrementQuantityFront(int id)
        {
            try
            {
                ShoppingCartImplementation.ReduceFromCart(id, @User.Identity.Name);
                return(RedirectToAction("Index", "Product"));
            }
            catch (Exception ex)
            {
                bool rethrow = ExceptionPolicy.HandleException(ex, "UI Policy");
                if (rethrow)
                {
                    throw;
                }
                return(RedirectToAction("Index", "Product"));
            }
        }