示例#1
0
        public static void SyncFinance()
        {
            var list = WYStockBiz.GetFinanceList(DateTime.Now);

            if (!list.IsNullOrEmpty())
            {
                FinanceDAL.InsertFinance(list);
            }
        }
示例#2
0
        public static void DownloadFinanceFromTHS()
        {
            var stockList = FinanceDAL.GetNoFinanceStock();

            foreach (var stock in stockList)
            {
                var list = THSBiz.DownloadFinance(stock);
                if (!list.IsNullOrEmpty())
                {
                    FinanceDAL.InsertFinance(list);
                }
            }
        }
示例#3
0
        public static void SyncFinanceFromTHS()
        {
            var reportDate = DateTime.Now;

            reportDate = DateTime.Parse(string.Format("{0}-{1}", reportDate.AddMonths(-6).Year - 2, "09-30"));
            while (reportDate < DateTime.Now)
            {
                var endDate = FinanceDAL.GetMaxIndate(reportDate).GetValueOrDefault(reportDate);
                var list    = THSBiz.GetFinanceList(reportDate, endDate);
                if (!list.IsNullOrEmpty())
                {
                    FinanceDAL.InsertFinance(list);
                }
                reportDate = reportDate.AddDays(1).AddMonths(3).AddDays(-1);
            }
        }