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