📄 homeparkinfo.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;
using System.Data.SqlClient;
public partial class addpavilion : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Convert.ToString(Session["UID"]) == "")
{
Response.Redirect("login.aspx");
}
if (!IsPostBack)
{
this.bind();
}
}
protected void bind()
{
BaseClass bc = new BaseClass();
bc.ExecDropDownList(parkname, "select * from basepark", "Name", "parkID");
bc.ExecDropDownList(pav, "select Name,paID from pavilion", "Name", "paID");
bc.ExecDropDownList(cell, "select * from cell", "Name", "ID");
string ownerID = Request.QueryString["ownerID"].ToString();
string sqlstr = "select * from v_homepark where ownerID='" +ownerID + "'";
bc.openconn();//打开数据库连接
SqlDataReader sda = bc.ExecRead(sqlstr);
if (sda.Read())
{ //绑定数据
parkname.Text = sda["parkID"].ToString();//停车场
pav.Text = sda["paID"].ToString();//楼宇
cell.Text = sda["cellID"].ToString();//单元
num.Text = sda["floornum"].ToString();// 门牌号
login.Text = sda["loginDate"].ToString();//登记日期
tsum.Text = sda["placesum"].ToString();//付款数额
carcode.Text = sda["carID"].ToString();//车牍号码
ddlyesno.Text = sda["sign"].ToString();//是否付款
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -