DY/User.aspx.cs
(完整代码) 2KBusing System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
public partial class DY_User : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
//显示当前的商品信息
DataTable tmpda = new DataTable();
tmpda = Database.GetData("select * from 党员信息 where 学号='" + Session["User"].ToString()+ "'");
if (tmpda.Rows.Count > 0)
{
txtXH.ReadOnly = true;
this.txtXH.Text = tmpda.Rows[0]["学号"].ToString();
this.Txtxm.Text = tmpda.Rows[0]["姓名"].ToString();
this.txtSFZ.Text = tmpda.Rows[0]["身份证号"].ToString();
this.DropDownList1.SelectedItem.Text = tmpda.Rows[0]["性别"].ToString();
this.TxtCDRQ.Text = tmpda.Rows[0]["出生日期"].ToString();
this.txtMZ.Text = tmpda.Rows[0]["民族"].ToString();
this.TxtJG.Text = tmpda.Rows[0]["籍贯"].ToString();
this.TxtRDRQ.Text = tmpda.Rows[0]["入党日期"].ToString();
this.TxtLXFS.Text = tmpda.Rows[0]["联系方式"].ToString();
this.txtBZ.Text = tmpda.Rows[0]["备注"].ToString();
}
}
}
protected void Button1_Click(object sender, EventArgs e)
{
if (this.txtMM.Text != this.Txtqrmm.Text)
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "js1", "<script>alert('密码输入不相同');</script>");
return;
}
Database.Execute("update 党员信息 set 密码='" + txtMM.Text + "' where 学号='" + Session["User"].ToString() + "'");
Response.Write("<script>alert('保存成功');window.location.href=window.location.href;</script>");
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。