AddReader.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class AddReader : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Request["no"] == null)
{
txtno.Visible = false;
lbno.Visible = false;
btnAdd.Enabled = true;
txtjieshu.Visible = lbjieshu.Visible = false;
}
else
{
string str = "";
//int i=Convert.ToInt32( Request["no"]);
btnSave.Enabled = true;
SqlConnection con = DB.con();
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
con.Open();
cmd.CommandText = "select * from reader where no='" + Request["no"] + "'";
SqlDataReader sqldatareader = cmd.ExecuteReader();
while (sqldatareader.Read())
{
txtno.Text = sqldatareader["no"].ToString();
txtnumber.Text = sqldatareader["number"].ToString();
txtname.Text = sqldatareader["name"].ToString();
txtidcard.Text = sqldatareader["idcard"].ToString();
str = sqldatareader["sex"].ToString();
txtjieshu.Text = sqldatareader["jieshu"].ToString();
//DropDownList1.SelectedValue = str;
if (str == "男")
{
DropDownList1.SelectedValue = "男";
}
else
{
DropDownList1.SelectedValue = "女";
}
}
}
}
}
protected void btnAdd_Click(object sender, EventArgs e)
{
if (txtname.Text != "")
{
lbname.Text = "";
SqlConnection con = DB.con();
后面还有 45 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。