GoodsDetail.aspx.cs

(完整代码) 1KB

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 Goodsdetail : System.Web.UI.Page
{
    public string nbianhao, nmingcheng, ndalei, nGTime, price, ntupian, nkucun;
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            string sql;
            sql = "select * from GoodsView where gid=" + Request.QueryString["gid"].ToString().Trim();
            BindData(sql);
        }
    }



    private void BindData(string sql)
    {
        DataSet result = ClassDB.GetDataSet(sql);
        if (result != null)
        {
            if (result.Tables[0].Rows.Count > 0)
            {
                nbianhao = result.Tables[0].Rows[0]["gbianhao"].ToString().Trim(); 
                nmingcheng = result.Tables[0].Rows[0]["gname"].ToString().Trim(); 
                ndalei = result.Tables[0].Rows[0]["sname"].ToString().Trim();
                nGTime = result.Tables[0].Rows[0]["GTime"].ToString().Trim(); 
                ntupian = result.Tables[0].Rows[0]["gpicture"].ToString().Trim(); 
                price = result.Tables[0].Rows[0]["gprice"].ToString().Trim();
                nkucun = result.Tables[0].Rows[0]["gstock"].ToString().Trim();

            }
        }
    }

}

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

AI 解读 AI

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

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