温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:明日网上商城购物系统源码
当前文件:
MingriNetShop/User/GoodsDetail.aspx.cs,打开代码结构图
MingriNetShop/User/GoodsDetail.aspx.cs,打开代码结构图1using System; 2
using System.Data; 3
using System.Configuration; 4
using System.Collections; 5
using System.Web; 6
using System.Web.Security; 7
using System.Web.UI; 8
using System.Web.UI.WebControls; 9
using System.Web.UI.WebControls.WebParts; 10
using System.Web.UI.HtmlControls; 11
using System.Data.SqlClient; 12
13
public partial class User_GoodsDetail : System.Web.UI.Page 14
{ 15
MangerClass mcObj = new MangerClass(); 16
protected void Page_Load(object sender, EventArgs e) 17
{ 18
if (!IsPostBack) 19
{ 20
GetGoodsInfo(); 21
} 22
} 23
public string GetClass(int P_Int_ClassID) 24
{ 25
string P_Str_ClassName = mcObj.GetClass(P_Int_ClassID); 26
return P_Str_ClassName; 27
} 28
public void GetGoodsInfo() 29
{ 30
DataSet ds = mcObj.GetGoodsInfoByIDDs(Convert.ToInt32(Request["GoodsID"].Trim()), "GoodsInfo"); 31
txtName.Text = ds.Tables["GoodsInfo"].Rows[0][2].ToString(); 32
txtFName.Text = GetClass(Convert.ToInt32(ds.Tables["GoodsInfo"].Rows[0][1].ToString())); 33
txtBrand.Text = ds.Tables["GoodsInfo"].Rows[0][4].ToString(); 34
txtUnit.Text = ds.Tables["GoodsInfo"].Rows[0][5].ToString(); 35
txtWeight.Text = mcObj.VarStr(ds.Tables["GoodsInfo"].Rows[0][6].ToString(),2); 36
txtMarketPrice.Text =mcObj.VarStr(ds.Tables["GoodsInfo"].Rows[0][8].ToString(),2); 37
txtMemberPrice.Text =mcObj.VarStr(ds.Tables["GoodsInfo"].Rows[0][9].ToString(),2); 38
ImageMapPhoto.ImageUrl = ds.Tables["GoodsInfo"].Rows[0][7].ToString(); 39
cbxCommend.Checked = Convert.ToBoolean(ds.Tables["GoodsInfo"].Rows[0][10].ToString()); 40
cbxHot.Checked = Convert.ToBoolean(ds.Tables["GoodsInfo"].Rows[0][11].ToString()); 41
cbxDiscount.Checked = Convert.ToBoolean(ds.Tables["GoodsInfo"].Rows[0][13].ToString()); 42
txtShortDesc.Text = ds.Tables["GoodsInfo"].Rows[0][3].ToString(); 43
} 44
protected void btnExit_Click(object sender, EventArgs e) 45
{ 46
if (Session["address"] == null) 47
Response.Redirect("index.aspx"); 48
else 49
{ 50
51
string addr = Session["address"].ToString(); 52
Response.Redirect(addr); 53
} 54
} 55
} 56




MangerClass mcObj 
}
}