using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace r14.Controllers
{

    public class StockData
    {
        public decimal OpeningPrice { get; set; }
        public decimal ClosingPrice { get; set; }
        public string Rating { get; set; }
    } 


    public class StocksController : Controller
    {
            public ActionResult Index()
            {
                return View();
            }


            public JsonResult GetQuote(string symbol)
            {
                // Możesz tu pobrać rzeczywiste dane
                if (symbol == "GOOG")
                    return Json(new StockData
                    {
                        OpeningPrice = 556.94M,
                        ClosingPrice = 558.20M,
                        Rating = "A+"
                    });
                else
                    return null;
            } 

    }
}
