Пример #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 }));
        }
Пример #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 }));
        }