📄 rss.cs
字号:
//======================================================
//== (c)2008 aspxcms inc by NeTCMS v1.0 ==
//== Forum:bbs.aspxcms.com ==
//== Website:www.aspxcms.com ==
//======================================================
using System;
using System.Data;
using System.Data.SqlClient;
using NetCMS.DALFactory;
using NetCMS.Model;
using System.Text.RegularExpressions;
using System.Text;
using System.Reflection;
using NetCMS.DALProfile;
using NetCMS.Config;
namespace NetCMS.DALSQLServer
{
public class Rss : DbBase, IRss
{
public int sel(string ClassID)
{
string Sql = "select count(*) from " + Pre + "news_Class where ParentID='" + ClassID + "' and isLock=0 and isRecyle=0 and IsURL=0";
return (int)DbHelper.ExecuteScalar(CommandType.Text, Sql, null);
}
public DataTable getxmllist(string ClassID)
{
string _datalib = Pre + "_news";
string getclassSQL = "Select DataLib from " + Pre + "news_class where ClassID='" + ClassID + "'";
DataTable dt = DbHelper.ExecuteTable(CommandType.Text, getclassSQL, null);
if (dt != null)
{
if (dt.Rows.Count > 0)
{
_datalib = dt.Rows[0]["DataLib"].ToString();
}
dt.Clear(); dt.Dispose();
}
string Sql = "select top 5 NewsTitle,CreatTime from " + _datalib + " where ClassID='" + ClassID + "' and isLock=0 and isRecyle=0 order by orderID asc,id desc";
DataTable rdr = DbHelper.ExecuteTable(CommandType.Text, Sql, null);
return rdr;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -