JBemp_xg.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 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;
public partial class JBemp_xg : System.Web.UI.Page
{
SQLHelper sqlHelper = new SQLHelper();
DataSet dt = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
try
{
string edit = Request.QueryString["id"];
HiddenField1.Value = edit;
string sql1 = "select * from employee where id='" + edit + "'";
dt = sqlHelper.ExecuteDataSet(sql1);
if (dt.Tables[0].Rows.Count > 0)
{
this.username.Text = dt.Tables[0].Rows[0]["username"].ToString();
this.userpwd.Text=dt.Tables[0].Rows[0]["userpwd"].ToString();
this.txtdh.Text = dt.Tables[0].Rows[0]["Carror"].ToString();
}
}
catch
{}
}
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
string strSql =
"update employee set username='" +
username.Text + "', userpwd='" +
this.userpwd.Text +
"',Carror='" + this.txtdh.Text + "' where Id='" +
HiddenField1.Value + "'";
if (sqlHelper.ExecuteNonQuery(strSql))
{
this.Messages.Text = "修改成功!";
}
else
{
this.Messages.Text = "修改失败!";
}
}
后面还有 12 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。