Beispiel #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 }));
        }
        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 }));
        }
Beispiel #3
0
        public ActionResult AddTyreToBasket(int tyreID, string description)
        {
            bool tyreAdded = basketRepository.typeAlreadyAdded(tyreID);

            if (!tyreAdded)
            {
                basketRepository.StoreTyre(tyreID, description);
            }
            else
            {
                basketRepository.adaugaCantitate(tyreID);
            }

            return(Json(new { exist = tyreAdded }));
        }