ShopingNet/Pages/Proscenium/showProducts.aspx.cs

(开头部分) 6KB

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

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

public partial class Pages_Proscenium_showProducts : System.Web.UI.Page
{
    ProductClassManagment pcm;
    ProductMangement pm;
    CustomersManagement cm;
    static int productclassid;
    Paging paging = new Paging();
    protected void Page_Load(object sender, EventArgs e)
    {
        cm = new CustomersManagement();
        pm = new ProductMangement();
        pcm = new ProductClassManagment();
        //判断用户是否有会员信息
        if (Session["customerName"] != null)
        {
            this.denglu.Visible = false;
            this.userInfo.Visible = true;
            string x = Session["customerID"].ToString();
            DataSet dsUserInfo = cm.Select("CustomerID ='" + x + "'");
            this.Image7.ImageUrl = @"~/Images/CustomerPhoto/" + dsUserInfo.Tables[0].Rows[0]["CustomerPhoto"].ToString();
            this.cname.Text = dsUserInfo.Tables[0].Rows[0]["CustomerName"].ToString();
            this.cid.Text = Session["customerID"].ToString();
            this.sex.Text = dsUserInfo.Tables[0].Rows[0]["Customersex"].ToString();
        }
        DataSet ds = pcm.ProductClassSelect();
        this.Repeater1.DataSource = ds.Tables[0];
        this.Repeater1.DataBind();
        if (!Page.IsPostBack)
        {     
            //绑定下拉类别控件
            pcm.GetProductClass(this.drp_subClass);
            //接收产品ID绑定产品
            productclassid = Convert.ToInt32(Request["cid"].ToString());
            this.drp_subClass.SelectedValue = productclassid.ToString();
            DataSet ds_url= pm.ProductSelect(" ProductClassID='" + productclassid + "'");
            if (ds_url.Tables[0].Rows.Count == 0)
            {
                this.Label2.Visible = true;
                this.Label2.Text = "很抱歉没有您想要类型的货物!";
                this.DataList1.DataSource = null;
                this.DataList1.DataBind();
                this.tab_paging.Visible = false;
                return;
            }
            else
            {
                this.Label2.Visible = false;
后面还有 79 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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