systemManage/userEdit.aspx.cs
(开头部分) 4KB这里只显示每个文件的开头 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;
using Mysqlserver;
public partial class systemManage_userEdit : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.btn_submit.Attributes.Add("onclick", "return isNull();");
if (Request.QueryString["userId"].ToString() != "null")
{
UserBind();
btn_submit.Text = "修改";
if (Session["user_role"] != "管理员")
{
this.ddl_userRole.Visible = false;
}
}
else
{
btn_submit.Text = "添加";
}
}
}
public void UserBind()
{
SqlServerDataBase db = new SqlServerDataBase();
SqlConnection conn = db.DBconn();
string sqlStr = "select * from user_info where user_id = '" + Request.QueryString["userId"].ToString() + "'";
DataSet ds = db.Select(sqlStr, conn);
txt_userId.Text = ds.Tables[0].Rows[0]["user_id"].ToString();
txt_userName.Text = ds.Tables[0].Rows[0]["user_name"].ToString();
txt_userPwd.Text = ds.Tables[0].Rows[0]["user_pwd"].ToString();
ddl_userSex.SelectedValue = ds.Tables[0].Rows[0]["user_sex"].ToString();
txt_telephone.Text = ds.Tables[0].Rows[0]["user_tele"].ToString();
ddl_userRole.SelectedValue = ds.Tables[0].Rows[0]["user_role"].ToString();
}
protected void btn_reset_Click(object sender, EventArgs e)
{
string url = "userManage.aspx";
this.Response.Write("<script>window.opener.location.href=window.opener.location.href;window.close();</script>");
this.Response.Write("<script>window.opener.location.replace('" + url + "');window.close();</script>");
}
protected void btn_submit_Click(object sender, EventArgs e)
{
SqlServerDataBase db = new SqlServerDataBase();
后面还有 39 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
