Esempio n. 1
0
/// <summary>
/// 更新信息
/// </summary>
        public int UpdateInfo(SqlTransaction trans, VerifyLogModel verModel, int VerifyLogId)
        {
            string key = "Cache_VerifyLog_Model_" + VerifyLogId;

            CacheHelper.RemoveCache(key);
            return(verDAL.UpdateInfo(trans, verModel, VerifyLogId));
        }
Esempio n. 2
0
/// <summary>
/// 从缓存读取信息
/// </summary>
        public VerifyLogModel GetCacheInfo(SqlTransaction trans, int VerifyLogId)
        {
            string key   = "Cache_VerifyLog_Model_" + VerifyLogId;
            object value = CacheHelper.GetCache(key);

            if (value != null)
            {
                return((VerifyLogModel)value);
            }
            else
            {
                VerifyLogModel verModel = verDAL.GetInfo(trans, VerifyLogId);
                CacheHelper.AddCache(key, verModel, null, Cache.NoAbsoluteExpiration, TimeSpan.FromMinutes(20), CacheItemPriority.Normal, null);
                return(verModel);
            }
        }
Esempio n. 3
0
/// <summary>
/// 插入信息
/// </summary>
        public int InsertInfo(SqlTransaction trans, VerifyLogModel verModel)
        {
            return(verDAL.InsertInfo(trans, verModel));
        }