예제 #1
0
        public ActionResult GetCodeTypeList(Pagination pagination, string queryJson)
        {
            var watch    = CommonHelper.TimerStart();
            var data     = dictionaryBLL.GetStandardTypes(pagination, queryJson);
            var JsonData = new
            {
                rows = data,
                pagination.total,
                pagination.page,
                pagination.records,
                costtime = CommonHelper.TimerEnd(watch)
            };

            return(Content(JsonData.ToJson()));
        }
예제 #2
0
        /// <summary>
        /// 标准类型字典列表
        /// </summary>
        /// <returns></returns>
        public IEnumerable <S101TypeEntity> GetStandardTypes()
        {
            var cacheList = CacheFactory.Cache().GetCache <IEnumerable <S101TypeEntity> >(busines.TCacheKey);

            if (cacheList == null)
            {
                var data = busines.GetStandardTypes();
                CacheFactory.Cache().WriteCache(data, busines.TCacheKey);
                return(data);
            }
            else
            {
                return(cacheList);
            }
        }