예제 #1
0
        public ActionResult AddTyreToBasket(int tyreId, string description, string price)
        {
            bool tyreAdded = basketRepo.TyreAlreadyAdded(tyreId);

            if (!tyreAdded)
            {
                basketRepo.StoreTyre(tyreId, description, price);
            }
            return(Json(new { exists = tyreAdded }));
        }
예제 #2
0
        public ActionResult AddTyreToBasket(int tyreId, string brand, string season, string article, double price)
        {
            bool tyreAdded = basketRepo.TyreAlreadyAdded(tyreId);

            if (!tyreAdded)
            {
                basketRepo.StoreTyre(tyreId, brand, season, article, price);
            }
            return(Json(new { exists = tyreAdded }));
        }