Web/Controls/SellSort.ascx.cs

(开头部分) 2KB

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

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

namespace MrZeng.Web.Controls
{
    public partial class SellSort : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                GoodsSellSortBind();
            }
        }

        /// <summary>
        ///热销商品绑定
        /// </summary>
        private void GoodsSellSortBind()
        {
            MrZeng.BLL.P_GoodsInfo bll = new MrZeng.BLL.P_GoodsInfo();
            DataSet ds = bll.GetList(10, "SellSum>=1", "SellSum desc");
            DLGoodsSellSort.DataSource = ds.Tables[0].DefaultView;
            DLGoodsSellSort.DataBind();
        }

        public string GetSubName(object str)
        {
            MrZeng.BLL.Common bll = new MrZeng.BLL.Common();
            return bll.substr(str.ToString(), 10);
        }

        protected void DLGoodsSellSort_ItemCommand(object source, DataListCommandEventArgs e)
        {
            int id = Convert.ToInt32(DLGoodsSellSort.DataKeys[e.Item.ItemIndex].ToString());
            Response.Write("<iframe id=\"AddClick\" style=\"width:0px; height:0px;\" src=\"UpdateClickCount.aspx?id=" + id + "\" frameborder=\"0\" scrolling=\"no\"  ></iframe>");
            if (e.CommandName == "details")
            {
                Response.Redirect("GoodsDetails.aspx?id=" + id);
            }
            if (e.CommandName == "collect")
            {
                Response.Write("<iframe id=\"IFR\" style=\"width:0px; height:0px;\" src=\"AddCollect.aspx?id=" + id + "&sum=1\" frameborder=\"0\" scrolling=\"no\"  ></iframe>");
            }
            if (e.CommandName == "buy")
            {
                Response.Write("<iframe id=\"IFRBUY\" style=\"width:0px; height:0px;\" src=\"AddCart.aspx?id=" + id + "&sum=1\" frameborder=\"0\" scrolling=\"no\"  ></iframe>");
                if (Session["VipNum"] != null)
                {
                    MrZeng.BLL.Common.Alert("添加到购物车成功!");
                }
            }
后面还有 4 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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