4.2 教师入库信息模块设计 本模块主要对教师信息的录入,以便清楚知道教师的情况,所以教师管理这个模块是比不可少的。光对教师的资料了解便清楚知道,某个老师是能胜任的课程。 http://www.paper51.com
本模块主要界面如下所示: paper51.com
paper51.com
主要代码如下所示: 内容来自论文无忧网 www.paper51.com Private Sub Command2_Click(Index As Integer) 内容来自www.paper51.com
On Error GoTo errDeal copyright paper51.com If Index = 0 Or Index = 2 Then copyright paper51.com CanSave (True) 内容来自www.paper51.com Else http://www.paper51.com CanSave(False) copyright paper51.com End If 内容来自www.paper51.com
Select Case Index 内容来自www.paper51.com
Case 0: paper51.com rs.AddNew copyright paper51.com CalltoNull http://www.paper51.com copyright paper51.com Case 1: 内容来自www.paper51.com j =MsgBox("你确定要删除本记录吗?", vbYesNo + vbQuestion, "删除") 内容来自论文无忧网 www.paper51.com If j =vbYes Then paper51.com rs.Delete copyright paper51.com CalltoNull paper51.com End If paper51.com
paper51.com
Case 2: paper51.com
rs.Delete 内容来自www.paper51.com
rs.AddNew copyright paper51.com Case 3: copyright paper51.com IfLen(LTrim$(RTrim$(Text1(0).Text))) > 0 Then 内容来自论文无忧网 www.paper51.com
'rs.AddNew copyright paper51.com
Fori = 0 To 2 内容来自论文无忧网 www.paper51.com If Len(LTrim$(RTrim$(Text1(i).Text))) > 0 Then 内容来自论文无忧网 www.paper51.com copyright paper51.com rs.Fields(i) = Text1(i).Text copyright paper51.com End If http://www.paper51.com 内容来自www.paper51.com Nexti http://www.paper51.com rs.Update 内容来自论文无忧网 www.paper51.com Else 内容来自论文无忧网 www.paper51.com MsgBox "姓名不得为空", vbOKOnly + vbExclamation, "Error" 内容来自论文无忧网 www.paper51.com End If 内容来自www.paper51.com
Case 4: http://www.paper51.com For i= 0 To 2 内容来自www.paper51.com
Text1(i).Text = strBak(i) http://www.paper51.com Next i 内容来自www.paper51.com CallCommand2_Click(3) http://www.paper51.com http://www.paper51.com End Select paper51.com Exit Sub paper51.com errDeal: 内容来自论文无忧网 www.paper51.com
MsgBox "database Error", vbExclamation + vbOKOnly,"error" paper51.com 'okEnd: 内容来自www.paper51.com End Sub 内容来自www.paper51.com |