示例#1
0
        //查询用户登录信息
        public List<V_UserLoginRecord> GetSysUserLoginRecordInfosBySearch(string StrState, DateTime DtStart, DateTime DtEnd)
        {
            using (SysUserLoginRecordBll UserLoginBll = new SysUserLoginRecordBll())
            {
                #region 
                List<V_UserLoginRecord> LoginList;
                string keyString = "UserLoginRecordInfos" + StrState + DtStart.ToString() + DtEnd.ToString(); ;
                if (WCFCache.Current[keyString] == null)
                {
                    IQueryable<V_UserLoginRecord> IQList = UserLoginBll.GetUserLoginRecordInfosBySearch(StrState, DtStart, DtEnd);
                    LoginList = IQList == null ? null : IQList.ToList();
                    WCFCache.Current.Insert(keyString, LoginList, DateTime.Now.AddMinutes(15));

                }
                else
                {
                    LoginList = (List<V_UserLoginRecord>)WCFCache.Current[keyString];
                }
                return LoginList.Count() > 0 ? LoginList : null;
                #endregion
            }
        }