📄 sys.cs
字号:
public int Update_FtpInfo(SysParamInfo sys)//保存基本参数设置
{
string Str_InSql = "Update " + Pre + "Sys_Param Set PicServerTF=@picsa,PicServerDomain=@Str_PicServerDomain,PicUpLoad=@Str_PicUpLoad,UpfilesType=@Str_UpfilesType,UpFilesSize=@Str_UpFilesSize,ReMoteDomainTF=@domainnn,RemoteDomain=@Str_RemoteDomain,RemoteSavePath=@Str_RemoteSavePath,ClassListNum=@Str_ClassListNum,NewsNum=@Str_NewsNum,BatDelNum=@Str_BatDelNum,SpecialNum=@Str_SpecialNum";
SqlParameter[] parm = GetFtpInfo(sys);
return DbHelper.ExecuteNonQuery(CommandType.Text, Str_InSql, parm);
}
private SqlParameter[] GetFtpInfo(SysParamInfo sys)
{
SqlParameter[] parm = new SqlParameter[12];
parm[0] = new SqlParameter("@picsa", SqlDbType.TinyInt);
parm[0].Value = sys.picsa;
parm[1] = new SqlParameter("@Str_PicServerDomain", SqlDbType.NText);
parm[1].Value = sys.Str_PicServerDomain;
parm[2] = new SqlParameter("@Str_PicUpLoad", SqlDbType.NVarChar, 200);
parm[2].Value = sys.Str_PicUpLoad;
parm[3] = new SqlParameter("@Str_UpfilesType", SqlDbType.NVarChar, 150);
parm[3].Value = sys.Str_UpfilesType;
parm[4] = new SqlParameter("@Str_UpFilesSize", SqlDbType.Int, 4);
parm[4].Value = sys.Str_UpFilesSize;
parm[5] = new SqlParameter("@domainnn", SqlDbType.TinyInt);
parm[5].Value = sys.domainnn;
parm[6] = new SqlParameter("@Str_RemoteDomain", SqlDbType.NVarChar, 100);
parm[6].Value = sys.Str_RemoteDomain;
parm[7] = new SqlParameter("@Str_RemoteSavePath", SqlDbType.NVarChar, 200);
parm[7].Value = sys.Str_RemoteSavePath;
parm[8] = new SqlParameter("@Str_ClassListNum", SqlDbType.Int, 4);
parm[8].Value = sys.Str_ClassListNum;
parm[9] = new SqlParameter("@Str_NewsNum", SqlDbType.Int, 4);
parm[9].Value = sys.Str_NewsNum;
parm[10] = new SqlParameter("Str_BatDelNum", SqlDbType.Int, 4);
parm[10].Value = sys.Str_BatDelNum;
parm[11] = new SqlParameter("@Str_SpecialNum", SqlDbType.Int, 4);
parm[11].Value = sys.Str_SpecialNum;
return parm;
}
#endregion
#region JS
public int Update_JS(SysParamInfo sys)//更新JS
{
string Str_InSqljs = "Update " + Pre + "Sys_Param Set HotNewsJs=@Str_HotJS,LastNewsJs=@Str_LastJS,RecNewsJS=@Str_RecJS,HotCommJS=@Str_HoMJS,TNewsJS=@Str_TMJS";
SqlParameter[] parm = GetJSInfo(sys);
return DbHelper.ExecuteNonQuery(CommandType.Text, Str_InSqljs, parm);
}
private SqlParameter[] GetJSInfo(SysParamInfo sys)
{
SqlParameter[] parm = new SqlParameter[5];
parm[0] = new SqlParameter("@Str_HotJS", SqlDbType.NVarChar, 200);
parm[0].Value = sys.Str_HotJS;
parm[1] = new SqlParameter("@Str_LastJS", SqlDbType.NVarChar, 200);
parm[1].Value = sys.Str_LastJS;
parm[2] = new SqlParameter("@Str_RecJS", SqlDbType.NVarChar, 200);
parm[2].Value = sys.Str_RecJS;
parm[3] = new SqlParameter("@Str_HoMJS", SqlDbType.NVarChar, 200);
parm[3].Value = sys.Str_HoMJS;
parm[4] = new SqlParameter("@Str_TMJS", SqlDbType.NVarChar, 200);
parm[4].Value = sys.Str_TMJS;
return parm;
}
#endregion
#region ftp
public int Update_JFtP(SysParamInfo sys)//更新JS
{
string Str_InSqlftp = "Update " + Pre + "sys_Pramother Set FtpTF=@ftpp,FTPIP=@Str_FTPIP,Ftpport=@Str_Ftpport,FtpUserName=@Str_FtpUserName,FTPPASSword=@Str_FTPPASSword";
SqlParameter[] parm = GetftpInfo(sys);
return DbHelper.ExecuteNonQuery(CommandType.Text, Str_InSqlftp, parm);
}
private SqlParameter[] GetftpInfo(SysParamInfo sys)
{
SqlParameter[] parm = new SqlParameter[5];
parm[0] = new SqlParameter("@ftpp", SqlDbType.Int, 4);
parm[0].Value = sys.ftpp;
parm[1] = new SqlParameter("@Str_FTPIP", SqlDbType.NVarChar, 100);
parm[1].Value = sys.Str_FTPIP;
parm[2] = new SqlParameter("@Str_Ftpport", SqlDbType.NVarChar, 5);
parm[2].Value = sys.Str_Ftpport;
parm[3] = new SqlParameter("@Str_FtpUserName", SqlDbType.NVarChar, 20);
parm[3].Value = sys.Str_FtpUserName;
parm[4] = new SqlParameter("@Str_FTPPASSword", SqlDbType.NVarChar, 50);
parm[4].Value = sys.Str_FTPPASSword;
return parm;
}
#endregion
#region 水印
public int Update_Water(SysParamInfo sys)//更新JS
{
string Str_InSql = "Update " + Pre + "Sys_ParmPrint Set PrintTF=@water,PrintPicTF=@Str_PrintPicTF,PrintWord=@Str_PrintWord,Printfontsize=@Str_Printfontsize,Printfontfamily=@Str_Printfontfamily,Printfontcolor=@Str_Printfontcolor,PrintBTF=@Str_PrintBTF,PintPicURL=@Str_PintPicURL,PrintPicsize=@Str_PrintPicsize,PintPictrans=@Str_PintPictrans,PrintPosition=@Str_PrintPosition,PrintSmallTF=@Str_PrintSmallTF,PrintSmallSizeStyle=@Str_PrintSmallSizeStyle,PrintSmallSize=@Str_PrintSmallSize,PrintSmallinv=@Str_PrintSmallinv";
SqlParameter[] parm = GetwaterInfo(sys);
return DbHelper.ExecuteNonQuery(CommandType.Text, Str_InSql, parm);
}
private SqlParameter[] GetwaterInfo(SysParamInfo sys)
{
SqlParameter[] parm = new SqlParameter[15];
parm[0] = new SqlParameter("@water", SqlDbType.TinyInt);
parm[0].Value = sys.water;
parm[1] = new SqlParameter("@Str_PrintPicTF", SqlDbType.TinyInt);
parm[1].Value = sys.Str_PrintPicTF;
parm[2] = new SqlParameter("@Str_PrintWord", SqlDbType.NVarChar, 50);
parm[2].Value = sys.Str_PrintWord;
parm[3] = new SqlParameter("@Str_Printfontsize", SqlDbType.Int, 4);
parm[3].Value = sys.Str_Printfontsize;
parm[4] = new SqlParameter("@Str_Printfontfamily", SqlDbType.NVarChar, 30);
parm[4].Value = sys.Str_Printfontfamily;
parm[5] = new SqlParameter("@Str_Printfontcolor", SqlDbType.NVarChar, 10);
parm[5].Value = sys.Str_Printfontcolor;
parm[6] = new SqlParameter("@Str_PrintBTF", SqlDbType.TinyInt);
parm[6].Value = sys.Str_PrintBTF;
parm[7] = new SqlParameter("@Str_PintPicURL", SqlDbType.NVarChar, 150);
parm[7].Value = sys.Str_PintPicURL;
parm[8] = new SqlParameter("@Str_PrintPicsize", SqlDbType.NVarChar, 8);
parm[8].Value = sys.Str_PrintPicsize;
parm[9] = new SqlParameter("@Str_PintPictrans", SqlDbType.NVarChar, 20);
parm[9].Value = sys.Str_PintPictrans;
parm[10] = new SqlParameter("@Str_PrintPosition", SqlDbType.TinyInt);
parm[10].Value = sys.Str_PrintPosition;
parm[11] = new SqlParameter("@Str_PrintSmallTF", SqlDbType.TinyInt);
parm[11].Value = sys.Str_PrintSmallTF;
parm[12] = new SqlParameter("@Str_PrintSmallSizeStyle", SqlDbType.TinyInt);
parm[12].Value = sys.Str_PrintSmallSizeStyle;
parm[13] = new SqlParameter("@Str_PrintSmallSize", SqlDbType.NVarChar, 8);
parm[13].Value = sys.Str_PrintSmallSize;
parm[14] = new SqlParameter("@Str_PrintSmallinv", SqlDbType.NVarChar, 20);
parm[14].Value = sys.Str_PrintSmallinv;
return parm;
}
/// <summary>
/// 取得站点水印信息
/// </summary>
/// <returns></returns>
public DataTable ParmPrintInfo()
{
string Sql = "Select * From " + Pre + "Sys_ParmPrint";
return DbHelper.ExecuteTable(CommandType.Text, Sql, null);
}
#endregion
#region rss wap
public int Update_RssWap(SysParamInfo sys)//更新JS
{
string Str_InSql = "Update " + Pre + "sys_Pramother Set RssNum=@Str_RssNum,RssContentNum=@Str_RssContentNum,RssTitle=@Str_RssTitle,RssPicURL=@Str_RssPicURL,WapTF=@wapp,WapPath=@Str_WapPath,WapDomain=@Str_WapDomain,WapLastNum=@Str_WapLastNum";
SqlParameter[] parm = GetrssrInfo(sys);
return DbHelper.ExecuteNonQuery(CommandType.Text, Str_InSql, parm);
}
private SqlParameter[] GetrssrInfo(SysParamInfo sys)
{
SqlParameter[] parm = new SqlParameter[8];
parm[0] = new SqlParameter("@Str_RssNum", SqlDbType.Int, 4);
parm[0].Value = sys.Str_RssNum;
parm[1] = new SqlParameter("@Str_RssContentNum", SqlDbType.Int, 4);
parm[1].Value = sys.Str_RssContentNum;
parm[2] = new SqlParameter("@Str_RssTitle", SqlDbType.NVarChar, 50);
parm[2].Value = sys.Str_RssTitle;
parm[3] = new SqlParameter("@Str_RssPicURL", SqlDbType.NVarChar, 200);
parm[3].Value = sys.Str_RssPicURL;
parm[4] = new SqlParameter("@wapp", SqlDbType.TinyInt);
parm[4].Value = sys.wapp;
parm[5] = new SqlParameter("@Str_WapPath", SqlDbType.NVarChar, 50);
parm[5].Value = sys.Str_WapPath;
parm[6] = new SqlParameter("@Str_WapDomain", SqlDbType.NVarChar, 50);
parm[6].Value = sys.Str_WapDomain;
parm[7] = new SqlParameter("@Str_WapLastNum", SqlDbType.Int, 4);
parm[7].Value = sys.Str_WapLastNum;
return parm;
}
#endregion
public DataTable ShowJS1()
{
string Str_StartSql = "Select PicServerTF,ReMoteDomainTF From " + Pre + "Sys_Param";//从参数设置表中读出数据并初始化赋值
return DbHelper.ExecuteTable(CommandType.Text, Str_StartSql, null);
}
public DataTable ShoeJs2()
{
string Str_StartSqlf = "Select FtpTF,WapTF From " + Pre + "Sys_Pramother";//从其他参数表中去数据
return DbHelper.ExecuteTable(CommandType.Text, Str_StartSqlf, null);
}
public DataTable showJs3()
{
string Str_StartSqlp = "Select PrintPicTF,PrintSmallTF,PrintSmallSizeStyle From " + Pre + "Sys_ParmPrint";//从水印参数表中去数据
return DbHelper.ExecuteTable(CommandType.Text, Str_StartSqlp, null);
}
public DataTable JsTemplet1()
{
string Str_SelectSql1 = "Select JsID,jsTName From " + Pre + "news_JSTemplet";
return DbHelper.ExecuteTable(CommandType.Text, Str_SelectSql1, null);
}
public DataTable JsTemplet2()
{
string Str_SelectSql2 = "Select JsID,jsTName From " + Pre + "news_JSTemplet";
return DbHelper.ExecuteTable(CommandType.Text, Str_SelectSql2, null);
}
public DataTable JsTemplet3()
{
string Str_SelectSql3 = "Select JsID,jsTName From " + Pre + "news_JSTemplet";
return DbHelper.ExecuteTable(CommandType.Text, Str_SelectSql3, null);
}
public DataTable JsTemplet4()
{
string Str_SelectSql4 = "Select JsID,jsTName From " + Pre + "news_JSTemplet";
return DbHelper.ExecuteTable(CommandType.Text, Str_SelectSql4, null);
}
public DataTable JsTemplet5()
{
string Str_SelectSql5 = "Select JsID,jsTName From " + Pre + "news_JSTemplet";
return DbHelper.ExecuteTable(CommandType.Text, Str_SelectSql5, null);
}
#endregion
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -