Exemplo n.º 1
0
/// <summary>
/// 更新信息
/// </summary>
        public int UpdateInfo(SqlTransaction trans, ManuFacturerModel manModel, long SN)
        {
            string key = "Cache_ManuFacturer_Model_" + SN;

            CacheHelper.RemoveCache(key);
            return(manDAL.UpdateInfo(trans, manModel, SN));
        }
Exemplo n.º 2
0
/// <summary>
/// 从缓存读取信息
/// </summary>
        public ManuFacturerModel GetCacheInfo(SqlTransaction trans, long SN)
        {
            string key   = "Cache_ManuFacturer_Model_" + SN;
            object value = CacheHelper.GetCache(key);

            if (value != null)
            {
                return((ManuFacturerModel)value);
            }
            else
            {
                ManuFacturerModel manModel = manDAL.GetInfo(trans, SN);
                CacheHelper.AddCache(key, manModel, null, Cache.NoAbsoluteExpiration, TimeSpan.FromMinutes(20), CacheItemPriority.Normal, null);
                return(manModel);
            }
        }
Exemplo n.º 3
0
/// <summary>
/// 插入信息
/// </summary>
        public int InsertInfo(SqlTransaction trans, ManuFacturerModel manModel)
        {
            return(manDAL.InsertInfo(trans, manModel));
        }