Web/User/UserCollection.aspx.cs

(开头部分) 2KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Common;
using System.Data;
using Maticsoft.BLL.WeiMai;

namespace WeiMaiShop.User
{

    public partial class UserCollection : UserPage
    {
        int pageSize = 15;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                ViewState["pageNo"] = 1;
                ViewState["sWhere"] = " UserName='"+username+"'";
                BindT_UserCollectionList(Convert.ToInt32(ViewState["pageNo"]), pageSize, ViewState["sWhere"].ToString());
            }
        }

        /// <summary>
        /// 分页绑定方法
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="strSql"></param>
        protected void BindT_UserCollectionList(int pageIndex, int pageSize, string sWhere)
        {
            //采用代码分页方法
            int iRecordCount = 0;

            //DataSet ds = bll.GetList(pageSize, pageIndex, "", out iRecordCount);
            DataSet ds = Common.cPageBase.PageList("T_UserCollection", "id", "*", pageSize, pageIndex, " id desc ", sWhere, out iRecordCount);
            AspNetPager1.RecordCount = iRecordCount;
            AspNetPager1.PageSize = pageSize;
            AspNetPager1.CurrentPageIndex = pageIndex;
            this.rpT_UserCollectionList.DataSource = ds;
            this.rpT_UserCollectionList.DataBind();

        }

        protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
        {
            ViewState["pageNo"] = e.NewPageIndex;
            BindT_UserCollectionList(e.NewPageIndex, pageSize, ViewState["sWhere"].ToString());
        }

        //删除用户
        protected void delItem_Click(object sender, EventArgs e)
        {
            string ID = delID.Value;
            T_UserCollectionBLL bll = new T_UserCollectionBLL();
            bll.DeleteList(ID);

后面还有 13 行代码,购买后查看完整代码

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

AI 解读

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

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