コード例 #1
0
 public ActionResult Finam(DownloadHistoryModel model)
 {
     IHistoricalProvider provider = new ClassLib.HistoricalProviders.Finam();
     model.Provider = provider;
     Download(model);
     return View("Download", model);
 }
コード例 #2
0
        public ViewResult Download(string providerName)
        {
            ViewBag.TickerList = ModelHelper.GetTickerList(tickerRepository);
            ViewBag.TimeFrameList = ModelHelper.GetTimeFrameList(timeFrameRepository);

            DownloadHistoryModel model = new DownloadHistoryModel();
            model.DateFrom = DateTime.Now.Date.AddDays(-1);
            model.DateTo = DateTime.Now.Date;
            model.ProviderName = providerName;

            return View(model);
        }
コード例 #3
0
        private void Download(DownloadHistoryModel model)
        {
            if (ModelState.IsValid)
            {
                int countDownload = model.DownloadAndSave();

                TempData["message"] = String.Format("Успешно загружено: {0} свечей", countDownload);
            }

            ViewBag.TickerList = ModelHelper.GetTickerList(tickerRepository);
            ViewBag.TimeFrameList = ModelHelper.GetTimeFrameList(timeFrameRepository);

        }