using RFrameGenerate.BLL;
using RFramework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace jiouosdptask.BLL
{
    public class LotteryResult
    {
        public static void GetLottery()
        {
            var dt = DateTime.Now;
            if (new DateTime(dt.Year, dt.Month, dt.Day, 2, 20, 0) < dt && dt < new DateTime(dt.Year, dt.Month, dt.Day, 10, 0, 0))
            {
                return;
            }
            Log.Write("获取彩票结果");
            System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback((obj) =>
            {
                try
                {
                    LotteryResultManage.CollectLotteryResult();
                    Log.Write("成功获取彩票结果");
                }
                catch (Exception ex)
                {
                    Log.Write("一元购获取彩票结果出错了! Message:{0}", ex.Message);
                }
            }));
        }
    }
}
