📄 default.aspx.cs
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
namespace novel
{
public partial class _default : System.Web.UI.Page
{
DB_Class pdb = new DB_Class();
protected void Page_Load(object sender, EventArgs e)
{
DataListBind();
}
public void DataListBind()
{
List_Original.DataSource = pdb.dst("select top 9 topicid,title from novel_topic order by updatetime ").Tables[0].DefaultView;
List_Original.DataBind();
List_Commend1.DataSource = pdb.dst("select top 9 commendid,title from novel_commend ").Tables[0].DefaultView;
List_Commend1.DataBind();
List_Commend2.DataSource = pdb.dst("select top 9 topicid,title from novel_topic order by commend ").Tables[0].DefaultView;
List_Commend2.DataBind();
List_NewsBook.DataSource = pdb.dst("select top 9 boardid,name from novel_board order by updatetime ").Tables[0].DefaultView;
List_NewsBook.DataBind();
List_News.DataSource = pdb.dst("select top 8 commendid,ImageUrl,boardname,title,left(intro,10) as intro from novel_commend where comtype='推荐图书 ' ").Tables[0].DefaultView;
List_News.DataBind();
List_Update.DataSource = pdb.dst("select top 8 commendid,ImageUrl,title,left(intro,10) as intro from novel_commend where comtype='更新图书 ' ").Tables[0].DefaultView;
List_Update.DataBind();
List_Very.DataSource = pdb.dst("select top 8 commendid,ImageUrl,boardname,title from novel_commend where comtype='站长推荐 ' ").Tables[0].DefaultView;
List_Very.DataBind();
List_day.DataSource = pdb.dst("select top 6 orderid,title,amount from novel_order order by amount desc").Tables[0].DefaultView;
List_day.DataBind();
List_Week.DataSource = pdb.dst("select top 6 orderid,title,weekc from novel_order order by weekc desc").Tables[0].DefaultView;
List_Week.DataBind();
List_All.DataSource = pdb.dst("select top 6 orderid,title,allc from novel_order order by allc desc").Tables[0].DefaultView;
List_All.DataBind();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -