KuCun/Editruku.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
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 KuCun_Editruku : System.Web.UI.Page
{
private string BID;
private int strID
{
get
{
return Convert.ToInt32(ViewState["_BID"]);
}
set
{
ViewState["_BID"] = Request.QueryString["BID"];
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ListBox1.Visible = false;
BID = Request["BID"].ToString();
BindData(BID);
}
}
private void BindData(string BID)
{
string sqlstr;
sqlstr = "select * from ruku where rukuID='" + BID + "'";
SqlConnection scon = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
SqlCommand scm = new SqlCommand(sqlstr, scon);
//打开数据库并执行查询操作
scon.Open();
SqlDataReader dr = scm.ExecuteReader();
if (dr.Read())
{
this.TextBox1.Text = dr["jingbanren"].ToString();
this.TextBox2.Text = dr["rukuBianma"].ToString();
this.TextBox3.Text = dr["huoName"].ToString();
this.TextBox4.Text = dr["shuliang"].ToString();
this.TextBox5.Text = dr["jinjia"].ToString();
this.TextBox6.Text = dr["zhonge"].ToString();
this.TextBox7.Text = dr["beizhu"].ToString();
this.DropDownList1.Text = dr["ghdw"].ToString();
this.DropDownList2.Text = dr["CangKu"].ToString();
}
//关闭数据库的连接
dr.Close();
scon.Close();
}
protected void Button1_Click(object sender, EventArgs e)
后面还有 45 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。