chewei/cheweidetail.aspx.cs

(完整代码) 1KB

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Text;
using System.Data.SqlClient;
//信息车位详细信息页面
public partial class chewei_cheweidetail : System.Web.UI.Page
{
    string id = "";
    protected void Page_Load(object sender, EventArgs e)
    {
	 id = Request.QueryString["id"].ToString();
           if (!Page.IsPostBack)
        {
           (Master.FindControl("Label1") as Label).Text = "车位详细信息";
            ShowInfo();
        }
    }

      // 初始化 车位 信息
    protected void ShowInfo()
    {

        //设置查询Sql
        string sql = "select * from chewei where cwid=" +id ;

        //根据编号得到相应的记录
        SqlDataReader sdr = SqlHelper.ExecuteReader(sql);
        if (sdr.Read())
        {
          	this.cw.Text= sdr["cw"].ToString();//车位
this.wz.Text= sdr["wz"].ToString();//位置
this.mj.Text= sdr["mj"].ToString();//面积
this.djsj.Text= sdr["djsj"].ToString();//登记时间
this.syr.Text= sdr["syr"].ToString();//所有人
this.Image1.ImageUrl = "../upload/" + sdr["tp"].ToString();

        }
    }


    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Redirect("../goumai/goumaiadd.aspx?cw="+this.cw.Text);
    }
}

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

AI 解读 AI

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

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