本文整理汇总了C#中JumboTCMS.DAL.Common.MaxValue方法的典型用法代码示例。如果您正苦于以下问题:C# Common.MaxValue方法的具体用法?C# Common.MaxValue怎么用?C# Common.MaxValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JumboTCMS.DAL.Common
的用法示例。
在下文中一共展示了Common.MaxValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Install
/// <summary>
/// 安装插件
/// </summary>
/// <param name="_name"></param>
/// <param name="_response">返回信息</param>
public bool Install(string _name, ref string _response)
{
if (!JumboTCMS.Utils.DirFile.FileExists(site.Dir + "extends/" + _name + "/install.config"))
{
_response = "插件的安装文件损坏或不存在";
return false;
}
using (DbOperHandler _doh = new Common().Doh())
{
_doh.Reset();
_doh.ConditionExpress = "1=1";
int pId = _doh.MaxValue("jcms_normal_extends", "pId");
string _Title = JumboTCMS.Utils.XmlCOM.ReadConfig(site.Dir + "extends/" + _name + "/install", "Title");
string _Author = JumboTCMS.Utils.XmlCOM.ReadConfig(site.Dir + "extends/" + _name + "/install", "Author");
string _Info = JumboTCMS.Utils.XmlCOM.ReadConfig(site.Dir + "extends/" + _name + "/install", "Info");
string _Type = JumboTCMS.Utils.XmlCOM.ReadConfig(site.Dir + "extends/" + _name + "/install", "Type");
string _BaseTable = JumboTCMS.Utils.XmlCOM.ReadConfig(site.Dir + "extends/" + _name + "/install", "BaseTable");
string _ManageUrl = JumboTCMS.Utils.XmlCOM.ReadConfig(site.Dir + "extends/" + _name + "/install", "ManageUrl");
int _Locked = JumboTCMS.Utils.Validator.StrToInt(JumboTCMS.Utils.XmlCOM.ReadConfig(site.Dir + "extends/" + _name + "/install", "Locked"), 0);
if (_BaseTable != "")//需要安装数据库
{
string _SqlScriptText = JumboTCMS.Utils.XmlCOM.ReadConfig(site.Dir + "extends/" + _name + "/install", "SqlScript" + base.DBType);
string _SqlScriptFile = site.Dir + "extends/" + _name + "/install.sql";
JumboTCMS.Utils.DirFile.SaveFile(_SqlScriptText, _SqlScriptFile);
if (!ExecuteSqlInFile(HttpContext.Current.Server.MapPath(_SqlScriptFile)))
{
_response = "数据表创建有误,可能已存在";
return false;
}
}
_doh.Reset();
_doh.AddFieldItem("Title", _Title);
_doh.AddFieldItem("Name", _name);
_doh.AddFieldItem("Author", _Author);
_doh.AddFieldItem("Info", _Info);
_doh.AddFieldItem("Type", _Type);
_doh.AddFieldItem("BaseTable", _BaseTable);
_doh.AddFieldItem("ManageUrl", _ManageUrl);
_doh.AddFieldItem("Locked", _Locked);
_doh.AddFieldItem("Enabled", 0);
_doh.AddFieldItem("pId", pId + 1);
_doh.Insert("jcms_normal_extends");
_response = "插件安装成功";
}
return true;
}