Пример #1
0
        public ActionResult GetPriceOnSelectedFlavour(string drink, string currentPrice)
        {
            try
            {
                string       v              = Request.QueryString["value"];
                DisplayModel model          = new DisplayModel();
                var          coolDrinkPrice = /*db.Pizzas.Select(t => t.PizzaPrice).FirstOrDefault();*/ db.GetPriceOnSelectedFlavour(drink).SingleOrDefault();
                var          newPrice       = Convert.ToDecimal(currentPrice) + coolDrinkPrice;

                Menu(drink);

                return(Json(new { price = newPrice.ToString() }));
            }
            catch (Exception e)
            {
                throw;
            }
        }