Пример #1
0
 /// <summary>
 /// 获取时间IIndID dbo.tb_DimIndicator
 /// </summary>
 /// <returns></returns>
 public static List<TbDimIndicator> GetIndId()
 {
     DimIndicatorDAO indicatorDao = new DimIndicatorDAO();
     List<TbDimIndicator> indicatorlist;
     if (cache.GetData("GetIndId") != null)
     {
         indicatorlist = (List<TbDimIndicator>)cache.GetData("GetIndId");
     }
     else
     {
         indicatorlist = indicatorDao.GetAll().ToList();
         cache.Add("GetIndId", indicatorlist);
     }
     if (indicatorlist.Count == 0)
     {
         indicatorlist = indicatorDao.GetAll().ToList();
         cache.Add("GetIndId", indicatorlist);
     }
     return indicatorlist;
 }
 //根据IndCate的Id查找指标
 public JsonResult GetIndicator(int cateId)
 {
     DimIndicatorDAO ddDao = new DimIndicatorDAO();
     var result = ddDao.GetByPage("ICateID=" + cateId, 0, int.MaxValue);
     return Json(result, JsonRequestBehavior.AllowGet);
 }