/// <summary> /// 获取查询条件的配置值 /// </summary> /// <returns></returns> public Common.ViewModels.AADTAndTransCalcuWViewModel GetHdayExEnWhere() { using (DataSubmittedEntities db = new DataSubmittedEntities()) { var hday = db.OT_HDayConfig.Where(a => a.Id == 7).ToList(); AADTAndTransCalcuWViewModel model = new AADTAndTransCalcuWViewModel(); if (hday != null && hday.Count > 0) { model.StartTime = (DateTime)hday[0].HDayStart; model.HolidayId = (int)hday[0].HDayId; model.EndTime = (DateTime)hday[0].HDayEnd; } return(model); } }
/// <summary> ///报表7:黄金周京津塘高速公路交通量统计表 /// </summary> /// <returns></returns> public ActionResult JJTHighWay() { try { AADTAndTransCalcuWViewModel pTemp = ReportFactory.Instance.report7.GetHdayExEnWhere(); IEnumerable <SelectListItem> pHolName = ReportFactory.Instance.DicGetListbyId((int)EDicParentId.Holiday).Select(i => new SelectListItem() { Value = i.DictId.ToString(), Text = i.Name, }); ViewBag.StartTime = pTemp.StartTime.ToString("yyyy年M月d日"); ViewBag.EndTime = pTemp.EndTime.ToString("yyyy年M月d日"); ViewBag.HolName = pHolName; ViewBag.HolidayId = pTemp.HolidayId.ToString(); } catch (Exception ex) { SystemLog.GetInstance().Info(ex.Message); } return(View()); }