コード例 #1
0
        public PartialViewResult Edit(int id)
        {
            var product = prd.GetById(id);

            ViewBag.Artist = art_bag();
            return(PartialView(product));
        }
コード例 #2
0
        public ActionResult AddCartItem(FormCollection item1, Product product)
        {
            var carrito  = cartprocess.GetByCookie(User.Identity.Name);
            var producto = productprocess.GetById(product.Id);


            var item = new CartItem();

            item.ProductId = producto.Id;
            item.Price     = producto.Price;
            item.Quantity  = Convert.ToInt32(item1["quantity"]);
            CheckAuditPattern(item, true);

            if (carrito == null)
            {
                NuevoCarrito(item);
            }
            else
            {
                item.CartId = carrito.Id;
                CarritoExistente(carrito, item);
            }
            return(RedirectToAction("Index", "Cart", cartprocess.GetByCookie(User.Identity.Name)));
        }
コード例 #3
0
        public void ProductDetail2(int id)
        {
            var prod = prd.GetById(id);

            ProductDetail(prod);
        }