BLL/CacheHelper.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Common;
namespace BLL
{
public class CacheHelper
{
/// <summary>
/// 字典所有数据缓存
/// </summary>
/// <returns></returns>
public static DataSet DictionaryData()
{
DataSet ds = null;
CacheManage cache = new CacheManage();
object objDs = cache.RetrieveObject("Dictionary");
if (objDs == null)
{
string sSql = @"select m.DictionaryID,m.DictionaryCode,m.IsPublic,m.Status,m.Description,d.ItemKey,d.ItemValue,d.IsDef
FROM T_Dictionary m join T_DictionaryInfo d on m.DictionaryID=d.DictionaryID
";
ds = DbHelperSQL.Query(sSql);
cache.AddObjectWith("Dictionary", ds);
}
else
{
ds = (DataSet)objDs;
}
return ds;
}
public static T_WebSite website()
{
T_WebSite model = null;
CacheManage cache = new CacheManage();
WeiMaiShopEntities ef = new WeiMaiShopEntities();
object objDs = cache.RetrieveObject("website");
if (objDs == null)
{
model = ef.T_WebSite.FirstOrDefault(p => p.ID == 1);
cache.AddObjectWith("website", model);
}
else
{
model = (T_WebSite)objDs;
}
ef.Dispose();
return model;
}
public static DataSet IndexRoom()
{
DataSet ds = null;
CacheManage cache = new CacheManage();
object objDs = cache.RetrieveObject("IndexRoom");
后面还有 79 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
