您目前尚未登陆,请选择【登陆】或【注册
首页->行政办公->个人图书管理系统源码>>adminLogin.aspx.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:个人图书管理系统源码
当前文件:文件类型 MyLibary/adminLogin.aspx.cs打开代码结构图
普通视图
		            
1using System; 2using System.Data; 3using System.Configuration; 4using System.Collections; 5using System.Web; 6using System.Web.Security; 7using System.Web.UI; 8using System.Web.UI.WebControls; 9using System.Web.UI.WebControls.WebParts; 10using System.Web.UI.HtmlControls; 11using MyLibrary.BusinessLogicLayer; 12 13public partial class adminLogin : System.Web.UI.Page 14{ 15 protected void Page_Load(object sender, EventArgs e) 16 { 17 18 } 19 //登录按钮单击事件 20 protected void imgBtnLogin_Click(object sender, ImageClickEventArgs e) 21 { 22 Users user = new Users();//创建Users对象user 23 if (user.CheckPassword(txtUserID.Text.Trim()))//根据用户编号查询用户密码 24 { 25 if (user.UserPassword == txtPwd.Text.Trim())//输入密码与用户密码相同 26 { 27 if (user.UserPower == 1)//如果该用户是总管理员 28 { 29 Session["userID"] = txtUserID.Text.Trim();//存储用户编号 30 Response.Redirect("adminMain.aspx");//转向总管理员操作界面 31 } 32 else if (user.UserPower == 2)//用户是普通管理员 33 { 34 Response.Redirect("Borrow/BorrowBook.aspx");//转向借书还书界面 35 } 36 } 37 else//密码错误,给出提示 38 { 39 lbl_message.Text = "您输入的密码错误!"; 40 } 41 } 42 else//用户不存在,给出提示 43 { 44 lbl_message.Text = "该用户不存在!"; 45 } 46 } 47} 48
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:个人图书管理系统源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号