1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using CB.Cache;
- using CB.Entity;
- namespace CB.Data
- {
- public partial class Caches
- {
- /// <summary>
- /// 走势图项CSS配置
- /// </summary>
- /// <returns></returns>
- public static IList<ChartCssConfigInfo> GetTrendChartItemCssConfigList()
- {
- var cache = CBCache.GetCacheService();
- IList<ChartCssConfigInfo> list = cache.GetObject(CacheKeys.TrendChartCssConfigList) as IList<ChartCssConfigInfo>;
- if (null == list)
- {
- list = ChartCssConfigService.ToList();
- cache.AddObject(CacheKeys.TrendChartCssConfigList, list);
- }
- return list;
- }
- /// <summary>
- /// 走势图项CSS配置
- /// </summary>
- /// <returns></returns>
- public static ChartCssConfigInfo GetTrendChartItemCssConfig(int id)
- {
- IList<ChartCssConfigInfo> List = GetTrendChartItemCssConfigList();
- if (List!=null && List.Count>0)
- {
- foreach (var item in List)
- {
- if (item.Id == id)
- {
- return item;
- }
- }
- }
- return null;
- }
- }
- }
|