Exemplo n.º 1
0
        public ActionResult AddToCart(FormCollection product)
        {
            int     productId       = Convert.ToInt32(product["productId"]);
            int     productQuantity = Convert.ToInt32(product["productQuantity"]);
            decimal sellingPrice    = Convert.ToDecimal(product["sellingPrice"]);
            string  productName     = product["productName"];

            cart.AddShoppingCartItem(productId, productQuantity, sellingPrice, productName);
            return(RedirectToAction("Product", new { id = productId }));
        }