Exemple #1
0
        /// <summary>
        /// 准备计算数据
        /// 加载一些外部数据,如商店名
        /// </summary>
        protected override void PrepareCompute()
        {
            base.PrepareCompute(); log.Info("PrepareCompute:");
            cityBL     = BLLFactory.Create <IWeatherCityBL>(UnitOfWork);
            forecastBL = BLLFactory.Create <IWeatherDailyForecastBL>(UnitOfWork);
            CityList   = cityBL.GetAllCity().Select(i => i.CityCode).Take(2000).ToList();

            //将当前日期以后的数据无效
            DateTime dt = System.DateTime.Now.Date;

            DisableByDate(dt);
        }
 /// <summary>
 /// 准备计算数据
 /// 加载一些外部数据,如商店名
 /// </summary>
 protected override void PrepareCompute()
 {
     base.PrepareCompute();
     bl          = BLLFactory.Create <IWeatherCityBL>(UnitOfWork);
     AllCityDict = bl.GetAllCity().ToDictionary(i => i.CityCode.Trim(), i => i);
 }