022_教学辅助系统
1.无需注册登录,支付后按照提示操作即可获取该资料.
2.资料以网页介绍的为准,下载后不会有水印.资料仅供学习参考之用.
密 惠 保
录图
你可以从用户类型中选择你的身份,然后根据提示输入用户名,密码,单击登录即可。
If Me.usertype.SelectedItem.Text = "学生"
Then
searchSql = "select student.Stu_Name,class.majorID,apartment.apartid from Student,class,major,apartment where Stu_Num='" & Me.txtuserName.Text & "'and Stu_Pwd='" & Me.txtuserPwd.Text & "'and student.classID=class.classID and class.majorID=major.majorID and major.apartID=apartment.apartID"
ElseIf Me.usertype.SelectedItem.Text = "系管理员"
Then
searchSql = "select Aad_Name,apartid from Apartadmin where AadID='" & Me.txtuserName.Text & "'and Aad_Pwd='" & Me.txtuserPwd.Text & "'"
ElseIf Me.usertype.SelectedItem.Text = "教务管理员"
Then
searchSql = "select tad_Name from Teachadmin where TadID='" & Me.txtuserName.Text & "'and Tad_Pwd='" & Me.txtuserPwd.Text & "'" [来源:http://www.think58.com]
ElseIf Me.usertype.SelectedItem.Text = "超级管理员"
Then
searchSql = "select sad_Name from Superadmin where Sad_ID='" & Me.txtuserName.Text & "'and Sad_Pwd='" & Me.txtuserPwd.Text & "'"
End If
//连接数据库并打开
cn = New SqlConnection("server=.;database=JXFZ;uid=sa;pwd=123 ")
cn.Open()
cmd = New SqlCommand(searchSql, cn)
dr = cmd.ExecuteReader()
If dr.HasRows() Then
dr.Read()
islogin = 1 //成功把islogin设置为1
//选课用户类型,数据用户密码正确后转跳下一页面
If Me.usertype.SelectedItem.Text = "学生" Then
Response.Redirect("jxfzstudent.aspx")
ElseIf Me.usertype.SelectedItem.Text = "教务管理员" Then
Response.Redirect("jxfzjwadmin.aspx")
ElseIf Me.usertype.SelectedItem.Text = "超级管理员" Then
Response.Redirect("jxfzsuperadmin.aspx")
ElseIf Me.usertype.SelectedItem.Text = "系管理员" Then copyright think58
[资料来源:http://www.THINK58.com]
Response.Redirect("apartadmin.aspx")
End If
Else
islogin = 0 //如果不成功设置为0
End If
用上面数据库查询语句,判断用户输入的用户名和密码是否正确。如果正确就可以转跳到下一页面继续操作。如果不正确就转向error.aspx页面.
think58.com [资料来源:www.THINK58.com]
上一篇:183_招投标系统