예제 #1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        /// <returns></returns>
        public static List <ProjectStepInfo> GetList()
        {
            string cacheKey = GetCacheKey();

            //本实体已经注册成缓存实体,并且缓存存在的时候,直接从缓存取
            if (CachedEntityCommander.IsTypeRegistered(typeof(ProjectStepInfo)) && CachedEntityCommander.GetCache(cacheKey) != null)
            {
                return(CachedEntityCommander.GetCache(cacheKey) as List <ProjectStepInfo>);
            }
            else
            {
                List <ProjectStepInfo> list       = new List <ProjectStepInfo>();
                ProjectStepCollection  collection = new  ProjectStepCollection();
                Query qry = new Query(ProjectStep.Schema);
                collection.LoadAndCloseReader(qry.ExecuteReader());
                foreach (ProjectStep projectStep in collection)
                {
                    ProjectStepInfo projectStepInfo = new ProjectStepInfo();
                    LoadFromDAL(projectStepInfo, projectStep);
                    list.Add(projectStepInfo);
                }
                //生成缓存
                if (CachedEntityCommander.IsTypeRegistered(typeof(ProjectStepInfo)))
                {
                    CachedEntityCommander.SetCache(cacheKey, list);
                }
                return(list);
            }
        }
예제 #2
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        /// <returns></returns>
        public static List <DayScoreInfo> GetList()
        {
            string cacheKey = GetCacheKey();

            //本实体已经注册成缓存实体,并且缓存存在的时候,直接从缓存取
            if (CachedEntityCommander.IsTypeRegistered(typeof(DayScoreInfo)) && CachedEntityCommander.GetCache(cacheKey) != null)
            {
                return(CachedEntityCommander.GetCache(cacheKey) as List <DayScoreInfo>);
            }
            else
            {
                List <DayScoreInfo> list       = new List <DayScoreInfo>();
                DayScoreCollection  collection = new  DayScoreCollection();
                Query qry = new Query(DayScore.Schema);
                collection.LoadAndCloseReader(qry.ExecuteReader());
                foreach (DayScore dayScore in collection)
                {
                    DayScoreInfo dayScoreInfo = new DayScoreInfo();
                    LoadFromDAL(dayScoreInfo, dayScore);
                    list.Add(dayScoreInfo);
                }
                //生成缓存
                if (CachedEntityCommander.IsTypeRegistered(typeof(DayScoreInfo)))
                {
                    CachedEntityCommander.SetCache(cacheKey, list);
                }
                return(list);
            }
        }
예제 #3
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        /// <returns></returns>
        public static List <MainWorkSheetInfo> GetList()
        {
            string cacheKey = GetCacheKey();

            //本实体已经注册成缓存实体,并且缓存存在的时候,直接从缓存取
            if (CachedEntityCommander.IsTypeRegistered(typeof(MainWorkSheetInfo)) && CachedEntityCommander.GetCache(cacheKey) != null)
            {
                return(CachedEntityCommander.GetCache(cacheKey) as List <MainWorkSheetInfo>);
            }
            else
            {
                List <MainWorkSheetInfo> list       = new List <MainWorkSheetInfo>();
                MainWorkSheetCollection  collection = new  MainWorkSheetCollection();
                Query qry = new Query(MainWorkSheet.Schema);
                collection.LoadAndCloseReader(qry.ExecuteReader());
                foreach (MainWorkSheet mainWorkSheet in collection)
                {
                    MainWorkSheetInfo mainWorkSheetInfo = new MainWorkSheetInfo();
                    LoadFromDAL(mainWorkSheetInfo, mainWorkSheet);
                    list.Add(mainWorkSheetInfo);
                }
                //生成缓存
                if (CachedEntityCommander.IsTypeRegistered(typeof(MainWorkSheetInfo)))
                {
                    CachedEntityCommander.SetCache(cacheKey, list);
                }
                return(list);
            }
        }
예제 #4
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        /// <returns></returns>
        public static List <EvaluateLevelInfo> GetList()
        {
            string cacheKey = GetCacheKey();

            //本实体已经注册成缓存实体,并且缓存存在的时候,直接从缓存取
            if (CachedEntityCommander.IsTypeRegistered(typeof(EvaluateLevelInfo)) && CachedEntityCommander.GetCache(cacheKey) != null)
            {
                return(CachedEntityCommander.GetCache(cacheKey) as List <EvaluateLevelInfo>);
            }
            else
            {
                List <EvaluateLevelInfo> list       = new List <EvaluateLevelInfo>();
                EvaluateLevelCollection  collection = new  EvaluateLevelCollection();
                Query qry = new Query(EvaluateLevel.Schema);
                collection.LoadAndCloseReader(qry.ExecuteReader());
                foreach (EvaluateLevel evaluateLevel in collection)
                {
                    EvaluateLevelInfo evaluateLevelInfo = new EvaluateLevelInfo();
                    LoadFromDAL(evaluateLevelInfo, evaluateLevel);
                    list.Add(evaluateLevelInfo);
                }
                //生成缓存
                if (CachedEntityCommander.IsTypeRegistered(typeof(EvaluateLevelInfo)))
                {
                    CachedEntityCommander.SetCache(cacheKey, list);
                }
                return(list);
            }
        }
예제 #5
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        /// <returns></returns>
        public static List <FileOfApplyInfo> GetList()
        {
            string cacheKey = GetCacheKey();

            //本实体已经注册成缓存实体,并且缓存存在的时候,直接从缓存取
            if (CachedEntityCommander.IsTypeRegistered(typeof(FileOfApplyInfo)) && CachedEntityCommander.GetCache(cacheKey) != null)
            {
                return(CachedEntityCommander.GetCache(cacheKey) as List <FileOfApplyInfo>);
            }
            else
            {
                List <FileOfApplyInfo> list       = new List <FileOfApplyInfo>();
                FileOfApplyCollection  collection = new  FileOfApplyCollection();
                Query qry = new Query(FileOfApply.Schema);
                collection.LoadAndCloseReader(qry.ExecuteReader());
                foreach (FileOfApply fileOfApply in collection)
                {
                    FileOfApplyInfo fileOfApplyInfo = new FileOfApplyInfo();
                    LoadFromDAL(fileOfApplyInfo, fileOfApply);
                    list.Add(fileOfApplyInfo);
                }
                //生成缓存
                if (CachedEntityCommander.IsTypeRegistered(typeof(FileOfApplyInfo)))
                {
                    CachedEntityCommander.SetCache(cacheKey, list);
                }
                return(list);
            }
        }
예제 #6
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        /// <returns></returns>
        public static List <WorkToolSumInfo> GetList()
        {
            string cacheKey = GetCacheKey();

            //本实体已经注册成缓存实体,并且缓存存在的时候,直接从缓存取
            if (CachedEntityCommander.IsTypeRegistered(typeof(WorkToolSumInfo)) && CachedEntityCommander.GetCache(cacheKey) != null)
            {
                return(CachedEntityCommander.GetCache(cacheKey) as List <WorkToolSumInfo>);
            }
            else
            {
                List <WorkToolSumInfo> list       = new List <WorkToolSumInfo>();
                WorkToolSumCollection  collection = new  WorkToolSumCollection();
                Query qry = new Query(WorkToolSum.Schema);
                collection.LoadAndCloseReader(qry.ExecuteReader());
                foreach (WorkToolSum workToolSum in collection)
                {
                    WorkToolSumInfo workToolSumInfo = new WorkToolSumInfo();
                    LoadFromDAL(workToolSumInfo, workToolSum);
                    list.Add(workToolSumInfo);
                }
                //生成缓存
                if (CachedEntityCommander.IsTypeRegistered(typeof(WorkToolSumInfo)))
                {
                    CachedEntityCommander.SetCache(cacheKey, list);
                }
                return(list);
            }
        }