图4.15 公寓管理界面
该界面包括“系统”,“学生信息管理”,“宿舍管理”和“退出”四大模块。
(1) 主界面设计
Dim strSQL As String
Dim strSQL_stud As String
With objCn
.Provider = "SQLOLEDB"
.ConnectionString = "User ID=sa;PWD=311359;Data Source=(local);" & "Initial Catalog=学生公寓管理系统"
.Open
End With
a = 1
objRs.CursorType = adOpenKeyset
objRs.LockType = adLockOptimistic
strSQL = "SELECT*FROM 呼叫检修 "
Set objRs.ActiveConnection = objCn
objRs.CursorLocation = adUseClient
objRs.Open (strSQL)
以上两个模块为标准的建立数据库模块和客户端记录集模块,下面为每个寝室编写提醒以及响应代码。 本文来自辣%文,论.文/网,
毕业论文 www.751com.cn 加7位QQ324'9114找原文
Dorm_number = objRs.Fields("寝室号") '记录寝室号
If objRs.Fields("桶装水") = 1 Then
Command1.BackColor = " &HFFFF00 "
Else
Command1.BackColor = " &H8000000F "
End If
If objRs.Fields("检修") = 1 Then
Command2.BackColor = " &H000000FF "
Else
Command2.BackColor = " &H8000000F "
End If
strSQL_stud = "SELECT*FROM 学生信息 WHERE 寝室号 LIKE '" & Dorm_number & " % '" '打开第二个表
Set Rs_stud.ActiveConnection = objCn
Rs_stud.CursorLocation = adUseClient
Rs_stud.Open (strSQL_stud)
If Rs_stud.RecordCount >= 4 Then
Command3.BackColor = "&H0080FFFF"
Else
Command3.BackColor = " &H8000000F "
End If
Rs_stud.Close
为下一个寝室编写代码:
objRs.MoveNext
If objRs.EOF Then
objRs.MoveLast
End If
Dorm_number = objRs.Fields("寝室号")
If objRs.Fields("桶装水") = 1 Then
Command4.BackColor = " &HFFFF00 "
Else
Command4.BackColor = " &H8000000F "
End If
If objRs.Fields("检修") = 1 Then
Command5.BackColor = " &H000000FF "
Else
Command5.BackColor = " &H8000000F "
End If
strSQL_stud = "SELECT*FROM 学生信息 WHERE 寝室号 LIKE '" & Dorm_number & " % '" '打开第二个表
Set Rs_stud.ActiveConnection = objCn
Rs_stud.CursorLocation = adUseClient
Rs_stud.Open (strSQL_stud)
If Rs_stud.RecordCount >= 4 Then
Command6.BackColor = "&H0080FFFF"
Else
Command6.BackColor = " &H8000000F "
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>
VB学生公寓管理系统设计毕业论文 第9页下载如图片无法显示或论文不完整,请联系qq752018766