/// <summary> /// 更新信息 /// </summary> public int UpdateInfo(SqlTransaction trans, FloorProductSettingModel floModel, int FloorProductSettingId) { string key = "Cache_FloorProductSetting_Model_" + FloorProductSettingId; CacheHelper.RemoveCache(key); return(floDAL.UpdateInfo(trans, floModel, FloorProductSettingId)); }
/// <summary> /// 从缓存读取信息 /// </summary> public FloorProductSettingModel GetCacheInfo(SqlTransaction trans, int FloorProductSettingId) { string key = "Cache_FloorProductSetting_Model_" + FloorProductSettingId; object value = CacheHelper.GetCache(key); if (value != null) { return((FloorProductSettingModel)value); } else { FloorProductSettingModel floModel = floDAL.GetInfo(trans, FloorProductSettingId); CacheHelper.AddCache(key, floModel, null, Cache.NoAbsoluteExpiration, TimeSpan.FromMinutes(20), CacheItemPriority.Normal, null); return(floModel); } }
/// <summary> /// 插入信息 /// </summary> public int InsertInfo(SqlTransaction trans, FloorProductSettingModel floModel) { return(floDAL.InsertInfo(trans, floModel)); }