Web/user_orders1.aspx.cs

(开头部分) 2KB

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

using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Data;
using System.IO;
using DBUtility;
namespace Web
{
    public partial class user_orders1 : System.Web.UI.Page
    {

        public int i = 1;
        public int pcount;                                   //总条数
        public int page;                                     //当前页
        public readonly int pagesize = 15;                   //设置每页显示的大小
        public string User_name;
        public int classId;
        public string keywords = "";
        public string property = "";
        public string ono = "";
        protected void Page_Load(object sender, EventArgs e)
        {
           
            if (!Page.IsPostBack)
            {
                if (Session["username"] != null)
                {
                    User_name = Session["username"].ToString();
                    this.RptBind("Id>0 and IsSlide=1 and uname='" + User_name + "'");
                }
                else 
                {
                    //Response.Write("<script>alert('你还没有登录,请登录后再来吧!');location.href='login.aspx';</script>");
                    //Response.End();
                    Page.RegisterStartupScript("fe421", "<script>alert('你还没有登录,请登录后再来吧!');location.href='login.aspx';</script>");
                }
               
               
            }
        }

        #region 数据列表绑定
        private void RptBind(string strWhere)
        {
         
            BLL.Products bll = new BLL.Products();
            int page = this.AspNetPager1.CurrentPageIndex - 1;
            this.AspNetPager1.PageSize = pagesize;
            //获得总条数
            this.pcount = bll.GetCount(strWhere);
            AspNetPager1.RecordCount = this.pcount;
            this.rptList.DataSource = bll.GetPageList(this.pagesize, this.page, strWhere, "Id desc");
            this.rptList.DataBind();
        }
        #endregion
        protected void AspNetPager1_PageChanged(object sender, EventArgs e)
后面还有 7 行代码,购买后查看完整代码

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

AI 解读

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

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