示例#1
0
        public async Task <ActionResult> AñadirProductoLog(int id, int cantidad, string userID, string token)
        {
            Producto_Carrito carrito = new Producto_Carrito {
                PRO_ID = id, CAR_PRO_CANTIDAD = cantidad
            };

            try
            {
                int            idUser   = Int32.Parse(userID);
                CarritoManager manager  = new CarritoManager();
                var            response = await manager.Ingresar(new Producto_Carrito { US_ID = idUser, CAR_PRO_CANTIDAD = cantidad, PRO_ID = id }, token);

                carrito.PCR_ID = response.PCR_ID;
                carrito.US_ID  = Int32.Parse(userID);
                return(View(response));
            }
            catch
            {
            }
            return(View(carrito));
        }