Web/xuetang_list.aspx.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
namespace Web
{
    public partial class xuetang_list : Web.UI.BasePage
    {
        public int pcount;                                   //总条数
        public int page;                                     //当前页
        public readonly int pagesize = 10;                    //设置每页显示的大小
        public  int kindId ;                      //类别种类
        public int ClassId;
        public int classId;
        public string keywords = "";
        public string property = "";
        protected int or;
        protected int Id;
        protected void Page_Load(object sender, EventArgs e)
        {
            ClassId = Convert.ToInt32(Request.QueryString["class"]);
         
            if (!string.IsNullOrEmpty(Request.Params["keywords"]))
            {
                this.keywords = Request.Params["keywords"].Trim();
            }
            if (!string.IsNullOrEmpty(Request.Params["property"]))
            {
                this.property = Request.Params["property"].Trim();
            }
            if (!int.TryParse(Request.Params["kindid"] as string, out this.kindId))
            {
                this.kindId = 7;
            }
            if (!Page.IsPostBack)
            {
                RptBind("Id>0" + this.CombSqlTxt(this.classId, this.keywords, this.property), "Id desc");
            }
            oneTypeBind();
           
        }
        #region 列表绑定
        private void RptBind(string _where, string _orderby)
        {
            BLL.Article bll = new BLL.Article();
            int page = this.AspNetPager1.CurrentPageIndex - 1;
            this.AspNetPager1.PageSize = pagesize;
            //获得总条数
            this.pcount = bll.GetCount(_where);
            AspNetPager1.RecordCount = this.pcount;
            AspNetPager1.UrlRewritePattern = "xuetang_list-" + ClassId + "-{0}.html";
            //查询分页绑定数据
            this.rptList.DataSource = bll.GetPageList(this.pagesize, page, _where, _orderby);
            this.rptList.DataBind();

        }
        #endregion
后面还有 90 行代码,购买后查看完整代码

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

AI 解读

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

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