PassWord.aspx.cs
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:1k
源码类别:

.net编程

开发平台:

C#

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. using com.etong.user;
  12. using com.etong.Inform;
  13. public partial class PassWord : System.Web.UI.Page
  14. {
  15.     protected void Page_Load(object sender, EventArgs e)
  16.     {        
  17.     }
  18.     protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
  19.     {        
  20.         int UserID = Convert.ToInt32(Request.QueryString["UserID"].ToString());
  21.         string UserIP = Request.QueryString["UserIP"].ToString();        
  22.         string Password = TextBox1.Text.ToString().Trim();
  23.         AllUser user = new AllUser();
  24.         DataSet ds = new DataSet();    
  25.         CheckUserInfo checkuserinfo = user.PCheckUser(UserID, Password, UserIP);
  26.         if (checkuserinfo != null)
  27.         {
  28.             Session["checkuserinfo"] = checkuserinfo;
  29.             Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>window.returnValue='success';window.close();</script>");
  30.             return;
  31.         }
  32.         else
  33.         {
  34.             Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('系统提示:用户和密码不匹配!');window.close();</script>");
  35.             return;
  36.         }
  37.     }
  38. }