Esempio n. 1
0
        public string Proceed()
        {
            List <TradingSession> result = GetAllTradingSession();

            if (result == null)
            {
                //List<TradingSession> updatedTradingSessionList = this.dataUpdateHelper.GetUpdatedTradingSessions(code);
                //result = GetTradingSessionDataResult(updatedTradingSessionList, null);
                //string path2 = dataUpdateHelper.GetPath_TradingSession(code);
                //CsvUtils_TradingSession.Save(path2, result);
                return(code + "的开盘时间已经是最新的,不需要更新");
            }
            string path = dataUpdateHelper.GetPath_TradingSession(code);

            CsvUtils_TradingSession.Save(path, result);
            return("更新完成" + code + "的开盘时间");
        }
Esempio n. 2
0
        /// <summary>
        /// 保存一个品种的所有交易时间数据
        /// </summary>
        /// <param name="code"></param>
        /// <param name="tradingSessions"></param>
        public void Save(string code, List <TradingSession> tradingSessions)
        {
            string path = dataPathUtils.GetTradingSessionPath(code);

            CsvUtils_TradingSession.Save(path, tradingSessions);
        }