DTcms.BLL/sys_config.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Web;
using System.Web.Caching;
using DTcms.Common;
namespace DTcms.BLL
{
public partial class siteconfig
{
private readonly DAL.siteconfig dal = new DAL.siteconfig();
/// <summary>
/// 读取配置文件
/// </summary>
public Model.siteconfig loadConfig(string configFilePath)
{
Model.siteconfig model = CacheHelper.Get<Model.siteconfig>(DTKeys.CACHE_SITE_CONFIG);
if (model == null)
{
CacheHelper.Insert(DTKeys.CACHE_SITE_CONFIG, dal.loadConfig(configFilePath), configFilePath);
model = CacheHelper.Get<Model.siteconfig>(DTKeys.CACHE_SITE_CONFIG);
}
return model;
}
/// <summary>
/// 读取客户端站点配置信息
/// </summary>
public Model.siteconfig loadConfig(string configFilePath, bool isClient)
{
Model.siteconfig model = CacheHelper.Get<Model.siteconfig>(DTKeys.CACHE_SITE_CONFIG_CLIENT);
if (model == null)
{
model = dal.loadConfig(configFilePath);
model.templateskin = model.webpath + "templates/" + model.templateskin;
CacheHelper.Insert(DTKeys.CACHE_SITE_CONFIG_CLIENT, model, configFilePath);
}
return model;
}
/// <summary>
/// 保存配置文件
/// </summary>
public Model.siteconfig saveConifg(Model.siteconfig model, string configFilePath)
{
return dal.saveConifg(model, configFilePath);
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
