admin/liuyan.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;
using System.Data.SqlClient;
public partial class admin_liuyan : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            string sid = Request.Params["id"].ToString();
            bindwaredata();
        }
    }
    public DataTable chaliu(string id)
    {
        SqlConnection conn = new SqlConnection(SqlHelper.connstring);
        SqlCommand comm = new SqlCommand("select * from tb_Post where id=@id", conn);
        comm.Parameters.AddWithValue("id", id);
        SqlDataAdapter da = new SqlDataAdapter(comm);
        DataTable table = new DataTable();
        da.Fill(table);
        return table;
    }
    void bindwaredata()
    {
        string sid = Request.Params["id"].ToString();

        DataTable table =chaliu(sid);
        if (table.Rows.Count != 0)
        {
            // idLb.Text = sid;
            title.Text = table.Rows[0]["title"].ToString();
            name.Text = table.Rows[0]["name"].ToString();
            partyname.Text = table.Rows[0]["partyname"].ToString();
            email.Text = table.Rows[0]["email"].ToString();
            htp.Text = table.Rows[0]["htp"].ToString();
            // pic.Src = table.Rows[0]["warepic"].ToString();
            neirong.Text = table.Rows[0]["neirong"].ToString();
            // priceLb.Text = table.Rows[0]["martpice"].ToString();
            //salepriceLb.Text = table.Rows[0]["putonghuiyuanjia"].ToString();
            // coutentDiv.InnerHtml = table.Rows[0]["waredescribe"].ToString();
        }
    }
  
}

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

AI 解读 AI

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

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