ShopingNet/Pages/Proscenium/ParticularProduct.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 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;
public partial class Pages_Proscenium_ParticularProduct : System.Web.UI.Page
{
CustomersManagement cm;
ProductMangement pm;
ProductClassManagment pcm;
int productid;
protected void Page_Load(object sender, EventArgs e)
{
pm = new ProductMangement();
productid = Convert.ToInt32(Request["productid"].ToString());
cm = new CustomersManagement();
pcm = new ProductClassManagment();
//判断用户是否有会员信息
if (Session["customerName"] != null)
{
this.denglu.Visible = false;
this.userInfo.Visible = true;
DataSet dsUserInfo = cm.Select("CustomerID ='" + Session["customerID"].ToString() + "'");
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(" ProductParentID = 0");
this.Repeater1.DataSource = ds.Tables[0];
this.Repeater1.DataBind();
//产品详细的绑定
DataSet ds_productInfo = pm.ProductSelect(" ProductID='"+productid+"'");
int cid = Convert.ToInt32(ds_productInfo.Tables[0].Rows[0]["ProductClassID"]);
string cname = pcm.ProductClassSelect(" ProductClassID = '" + cid + "'").Tables[0].Rows[0]["ProductClassName"].ToString();
this.Lab_name.Text = ds_productInfo.Tables[0].Rows[0]["ProductName"].ToString();
this.Lab_ID.Text = ds_productInfo.Tables[0].Rows[0]["ProductID"].ToString();
this.Lab_date.Text = ds_productInfo.Tables[0].Rows[0]["PrductDate"].ToString();
this.Lab_price.Text = ds_productInfo.Tables[0].Rows[0]["ProductUnitPrice"].ToString();
this.count.Text = ds_productInfo.Tables[0].Rows[0]["ProductCount"].ToString();
this.Txt_description.Text = ds_productInfo.Tables[0].Rows[0]["ProductContent"].ToString();
this.Lab_proclass.Text = cname;
this.Image1.ImageUrl = @"~\Images\ProductsImages\" + ds_productInfo.Tables[0].Rows[0]["ProductImg"].ToString();
}
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
DataSet ds = cm.Select("CustomerName = '" + this.TextBox1.Text.ToString() + "' and CustomerPwd ='" + this.TextBox2.Text.ToString() + "'");
if (ds.Tables[0].Rows.Count > 0)
{
Session["customerName"] = this.TextBox1.Text.ToString();
Session["customerID"] = ds.Tables[0].Rows[0]["CustomerID"].ToString();
this.denglu.Visible = false;
后面还有 18 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
