WebUI/List.aspx.cs

(完整代码) 1KB

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;
using System.Collections.Generic;

public partial class List : PageBase
{
    public Maticsoft.BLL.db_News db = new Maticsoft.BLL.db_News();
    public Maticsoft.BLL.db_Class db1 = new Maticsoft.BLL.db_Class();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Band();
        }
    }
    public void Band()
    {
        string type = ext_string(Request.QueryString["ID"]);

       
            this.lbClassName.Text = "班级动态";
        

        DataSet ds = new DataSet();
        string sqlwhere = " 1=1 ";
        sqlwhere += type != "" ? " and  ClassID='0'" : "";
        ds = db.GetList(sqlwhere);
        AspNetPager1.RecordCount = ds.Tables.Count;
        PagedDataSource pdsList = new PagedDataSource();
        pdsList.DataSource = ds.Tables[0].DefaultView;
        pdsList.AllowPaging = true;
        pdsList.PageSize = AspNetPager1.PageSize;
        pdsList.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1;
        this.replist.DataSource = pdsList;
        this.replist.DataBind();
    }
    protected void AspNetPager1_PageChanged(object sender, EventArgs e)
    {
        Band();
    }
    protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
    {
        AspNetPager1.CurrentPageIndex = e.NewPageIndex;
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。