Exemplo n.º 1
0
        public ActionResult Edit(int id, ChartingModel m)
        {
            var filepath = GetFilePathById(id.ToString());

            System.IO.File.WriteAllText(Server.MapPath(filepath), TimeStampString(m.QuotesString));
            return(null);
        }
Exemplo n.º 2
0
        public ActionResult Charting()
        {
            string id = Request.QueryString["t"];

            storeUrl   = leveragedETFUrl;
            ViewBag.h2 = "Leveraged ETFs";
            string fileContents = string.Empty;

            ViewBag.h2      = GetTitleById(id);
            fileContents    = System.IO.File.ReadAllText(Server.MapPath(GetFilePathById(id)));
            ViewBag.Message = "Page for testing Charts";
            ChartingModel model = new ChartingModel();

            model.quotes      = SplitCommaString(fileContents.ToString());
            model.LastUpdate  = model.quotes[0];
            model.LastUpdate2 = model.quotes[1];
            model.quotes.RemoveRange(0, 2);
            return(View(model));
        }