📄 goodsdetail.aspx.cs
字号:
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;
public partial class User_GoodsDetail : System.Web.UI.Page
{
MangerClass mc = new MangerClass();
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
GetGoodsInfo();
}
}
public void GetGoodsInfo()
{
string GoodsId=Request["GoodsID"].Trim();
DataSet ds = mc.GetGoodsInfoByID(GoodsId, "tb_GoodsInfo");
txtName.Text = ds.Tables["tb_GoodsInfo"].Rows[0]["GoodsName"].ToString();
//txtFName
txtBrand.Text = ds.Tables["tb_GoodsInfo"].Rows[0]["GoodsBrand"].ToString();
txtUnit.Text = ds.Tables["tb_GoodsInfo"].Rows[0]["GoodsUnit"].ToString();
txtMarketPrice.Text = ds.Tables["tb_GoodsInfo"].Rows[0]["MarketPrice"].ToString();
txtMemberPrice.Text = ds.Tables["tb_GoodsInfo"].Rows[0]["MemberPrice"].ToString();
ImagePhoto.ImageUrl = ds.Tables["tb_GoodsInfo"].Rows[0]["GoodsUrl"].ToString();
txtShortDesc.Text = ds.Tables["tb_GoodsInfo"].Rows[0]["GoodsIntroduce"].ToString();
if (ds.Tables["tb_GoodsInfo"].Rows[0]["Isrefinement"].ToString() == "1")
{
cbxCommend.Checked = true;
}
if (ds.Tables["tb_GoodsInfo"].Rows[0]["IsDiscount"].ToString() == "1")
{
cbxDiscount.Checked = true;
}
if (ds.Tables["tb_GoodsInfo"].Rows[0]["IsHot"].ToString() == "1")
{
cbxHot.Checked = true;
}
}
protected void btnExit_Click(object sender, EventArgs e)
{
string url=Session["address"].ToString();
Response.Redirect(url);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -