C2C.Web/shop/shopGoodsList.aspx.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace C2C.Web.shop
{
    public partial class shopGoodsList : System.Web.UI.Page
    {
        public string uid = "0";
        BLL.pubGoods bllGoods = new BLL.pubGoods();
        BLL.pubuser bllUser = new BLL.pubuser();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!string.IsNullOrEmpty(Request["uid"]))
                {
                    uid = Request["uid"];
                }
                BindGood();
                BindTJ();
                BindHot();
            }
            this.Page.Title = webName.GetWebName() + "-店铺首页";
        }
        /// <summary>
        /// 热销
        /// </summary>
        private void BindHot()
        {
            DataTable dt = new BLL.pubGoods().GetList(5, " status=1 and userid=" + uid, " gcount desc").Tables[0];
            this.rptHot.DataSource = dt;
            this.rptHot.DataBind();
        }
        /// <summary>
        /// 推荐
        /// </summary>
        private void BindTJ()
        {
            DataTable dt = new BLL.pubGoods().GetList(5, " status=1 and Recommend=1 and userid=" + uid, " newid() desc").Tables[0];
            this.rptTJ.DataSource = dt;
            this.rptTJ.DataBind();
        }

        private void BindGood()
        {
            DataTable dt = bllGoods.GetList(12, " [status]=1 and userid="+uid, "createTime desc").Tables[0];

            this.Repeater1.DataSource = dt;
            this.Repeater1.DataBind();
        }
    }
}

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

AI 解读

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

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