FindPwd.aspx.cs
资源名称:yjal.rar [点击查看]
上传用户:shjujing
上传日期:2022-07-28
资源大小:11244k
文件大小:1k
源码类别:
Email客户端
开发平台:
Visual C++
- 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 Module_FindPwd : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- }
- protected void btnOK_Click(object sender, EventArgs e)
- {
- SqlData da = new SqlData();
- string cmdtxt = "select * from tb_User where IdenCard='"+this.txtIdencard.Text+"'";
- SqlCommand Com = new SqlCommand(cmdtxt,da.ExceCon());
- SqlDataReader dr = Com.ExecuteReader();
- dr.Read();
- if (dr.HasRows)
- {
- this.Panel1.Visible = false;
- this.Panel2.Visible = true;
- this.txtAccounts.Text = dr["UserName"].ToString();
- this.txtPwd.Text = dr["Password"].ToString();
- }
- else
- {
- Response.Write("<script language=javascript>alert('您输入的身份证号码不存在!');location='javascript:history.go(-1)'</script>");
- }
- }
- protected void btnCancel_Click(object sender, EventArgs e)
- {
- Response.Redirect("../../Index.aspx");
- }
- protected void btnBack_Click(object sender, EventArgs e)
- {
- Response.Redirect("../../Index.aspx");
- }
- }