Asp.net源码专业站
首页->尚未分类->Asp.net在线考试系统源码及毕业设计论文>>UserControl/uc_login.ascx.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:Asp.net在线考试系统源码及毕业设计论文
当前文件:文件类型 ExamOnline/UserControl/uc_login.ascx.cs[2K,2009-6-12 11:42:06]打开代码结构图
普通视图
		            
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; 11 12public partial class UserControl_uc_login : System.Web.UI.UserControl 13{ 14 //该源码下载自www.51aspx.com(51aspx.com) 15 16 protected void Page_Load(object sender, EventArgs e) 17 { 18 TextBox1.Focus(); 19 } 20 protected void Button1_Click(object sender, EventArgs e) 21 { 22 string userID = TextBox1.Text.ToString(); 23 string userPWD = TextBox2.Text.ToString(); 24 25 if ( (userID == "") || (userPWD == "") ) 26 { 27 ExamOnline.Common.ShowMess("出错可能原因:1.用户名不能为空。2.密码不能为空。"); 28 } 29 else 30 { 31 if (cbExercise.Checked == false) 32 { 33 int loginResult = (new ExamOnline.Login()).checkUser(ref userID, ref userPWD); 34 if (loginResult == 2) 35 { 36 Session["userID"] = userID; 37 Session["checkUser"] = "exam"; 38 Response.Redirect("examlogin.aspx"); 39 } 40 else if (loginResult == 0) 41 { 42 ExamOnline.Common.ShowMess("出错可能原因:1.用户名错误。2.密码错误。"); 43 } 44 else if (loginResult == 1) 45 { 46 ExamOnline.Common.ShowMess("出错可能原因:该时段内没有考试!"); 47 } 48 else if (loginResult == 3) 49 { 50 ExamOnline.Common.ShowMess("出错可能原因:1.你本学期无该课程的考试。2.你已经考过。"); 51 } 52 else if (loginResult == 4) 53 { 54 ExamOnline.Common.ShowMess("出错可能原因:1.你迟到规定的时间以上。2.考试未开始。"); 55 } 56 } 57 else if(cbExercise.Checked == true) 58 { 59 bool ifAllow = (new ExamOnline.Login()).checkPWD(ref userID, ref userPWD); 60 if (ifAllow == true) 61 { 62 Session["checkUser"] = "exercise"; 63 Response.Redirect("exerciselogin.aspx"); 64 } 65 else 66 { 67 ExamOnline.Common.ShowMess("出错可能原因:1.用户名错误。2.密码错误。"); 68 } 69 } 70 } 71 } 72} 73
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:Asp.net在线考试系统源码及毕业设计论文
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146