Esempio n. 1
0
 public bool Execute(StockInfo info)
 {
     string startDate = info.startDate.Equals("") ? Constant.ANALYZE_START_DATE : info.startDate;
     //string endDate = info.endDate.Equals("") ? StockUtil.FormatDate(DateTime.Now) : info.endDate;
     Analyzer.Analyze(info.stock, startDate, StockUtil.FormatDate(DateTime.Now), info.filterList);
     return true;
 }
Esempio n. 2
0
        public bool Execute(StockInfo info)
        {
            foreach (string filter in info.filterList)
            {
                foreach (int type in Enum.GetValues(typeof(RangeType)))
                {

                    //String filePath = string.Format(@"{0}{1}\{1}_{2}_{3}_{4}_{5}.csv", Constant.ANALYZE_FOLDER, stock, startDate, endDate, filter, (RangeType)type);
                    String filePath = string.Format(@"{0}{1}\{1}_{3}_{2}.csv", Constant.ANALYZE_FOLDER, info.stock, (RangeType)type, filter);
                    Program.ReportExcelToImage(filePath, new String[] { "BuyShare", "SellShare" }, "BuySellShare", ChartType.COLUMN);
                    Program.ReportExcelToImage(filePath, new String[] { "increDiffMoney" }, "increDiffMoney", ChartType.LINE);
                }
            }
            return true;
        }
Esempio n. 3
0
        public bool Execute(StockInfo info)
        {
            string startDate;
            if (Constant.DOWNLOAD_ALL.Equals("0"))
            {
                startDate = StockUtil.ReadUpdateFile(info.stock);
            }
            else
            {
                startDate = "2014-01-01";
            }
            string endDate = StockUtil.FormatDate(DateTime.Now);
            //DataDownload.DownloadDataToCsv(info.stock, startDate, endDate);
            StockUtil.UpdateDownloadTimeStamp(info.stock, endDate);
            StockLog.Log.Info(info.stock + " updated " + startDate + " " + endDate);

            return true;
        }