排课管理系统论文内容摘要:

ok: Err: Call dataOver ok: End Sub Private Sub dataOver() If Then Command1(0).Enabled = False Command1(1).Enabled = False Command1(2).Enabled = True Command1(3).Enabled = True Else If Then Command1(0).Enabled = True Command1(1).Enabled = True Command1(2).Enabled = False Command1(3).Enabled = False Else MsgBox Database Error, vbExclamation + vbOKOnly, Error unknown End If End If End Sub Private Sub Command2_Click(Index As Integer) On Error GoTo errDeal If Index = 0 Or Index = 2 Then 20 CanSave (True) Else CanSave (False) End If Select Case Index Case 0: Call toNull Case 1: j = MsgBox(你确定要删除本记录吗。 , vbYesNo + vbQuestion, 删除 ) If j = vbYes Then Call toNull End If Case 2: Case 3: If Len(LTrim$(RTrim$(Text1(0).Text))) 0 Then 39。 For i = 0 To 2 If Len(LTrim$(RTrim$(Text1(i).Text))) 0 Then (i) = Text1(i).Text End If Next i Else MsgBox 姓名不得为空 , vbOKOnly + vbExclamation, Error End If Case 4: For i = 0 To 2 21 Text1(i).Text = strBak(i) Next i Call Command2_Click(3) End Select Exit Sub errDeal: MsgBox database Error, vbExclamation + vbOKOnly, error 39。 okEnd: End Sub Private Sub CanSave(ok As Boolean) = Not ok = ok For i = 0 To 4 If i 3 Then Command2(i).Enabled = Not ok Else Command2(i).Enabled = ok End If Next i End Sub Private Sub Form_Load() Dim t As Integer Set con = New Set rs = New Set qrs = New 39。 Provider=。 Persist Security Info=False。 Data Source=C:\WINDOWS\Desktop\ provider=。 data source= amp。 amp。 \ select * from teacher, con, adOpenStatic, adLockOptimistic If 0 Then 22 displayInfo CanSave (False) Else 39。 new data CanSave (True) Call Command2_Click(0) End If End Sub Private Sub displayInfo() i = j = 0 For i = 0 To 2 39。 Text1(i).Text = If Len((i)) 0 Then Text1(i).Text = (i) strBak(i) = Text1(i).Text End If Next i End Sub Private Sub toNull() For i = 0 To 2 Text1(i).Text = strBak(i) = Next i End Sub Private Sub Form_Unload(Cancel As Integer) On Error GoTo KK Set rs = Nothing Set qrs = noting 23 Set con = Nothing KK: End Sub Private Sub Frame3_DragDrop(Source As Control, X As Single, Y As Single) End Sub Private Sub queryComm_Click() slSql = select * from Teacher where cTrname = 39。 + Text1(3).Text + 39。 slSql, con, adOpenStatic If Not Then i = j = 0 For i = 0 To 2 39。 Text1(i).Text = If Len((i)) 0 Then Text1(i).Text = (i) strBak(i) = Text1(i).Text End If Next i End If End Sub Form2: Option Explicit Dim conn As Dim rsTr As Dim rsSj As Dim i, j, sjCnt As Integer Dim ClassCode As String Dim TrChanged, ClassChanged As Boolean Dim strSql As String Dim rsTrAry As 24 Dim rsClassAry As Dim StrTr(9) As String Dim strSj(49) As String Dim minht, maxHt As Integer Private Sub EnableSave(ok As Boolean) Dim k As Integer For k = 0 To 3 If k 2 Then cb(k).Enabled = Not ok Else cb(k).Enabled = ok End If Next k = Not ok = ok = ok End Sub Private Sub cb_Click(Index As Integer) = 11 On Error GoTo errDeal Select Case Index Case 0: ClassCode = Trim(Combo1(0).Text) amp。 . amp。 Trim(Combo1(1).Text) If Len(Trim(Combo1(0).Text)) 0 And Len(ClassCode) 1 Then Call displayInfo cb(1).Enabled = True End If Case 1: cb_Click (0) EnableSave (True) cb(1).Enabled = False 25 Case 2: If TrChanged Then strSql = delete * from trclass where cclasscode=39。 amp。 ClassCode amp。 39。 strSql Dim strTrName As String For i = 0 To sjCnt 1 strTrName = Trim(Combo2(i).Text) If Len(strTrName) 0 Then strSql = insert into trclass values(39。 amp。 ClassCode amp。 39。 , + 39。 + Trim(Label2(i).Caption) + 39。 , + 39。 + Trim(Combo2(i).Text) + 39。 ) 39。 = strSql strSql End If Next i TrChanged = False cb(1).Enabled = False End If If ClassChanged Then delete * from classarray where cclasscode=39。 amp。 ClassCode amp。 39。 Dim X, Y As Integer For i = 0 To 49 Y = i Mod 5 + 1 X = Int(i / 5) + 1 If Len(Trim(Combo3(i).Text)) 0 Then strSql = insert into classarray values(39。 amp。 ClassCode amp。 39。 , amp。 Y amp。 , amp。 X amp。 , 39。 amp。 Trim(Combo3(i).Text) amp。 39。 ) 39。 = strSql strSql End If Next i 26 ClassChanged = False End If EnableSave (False) Case 3: For i = 0 To sjCnt 1 Combo2(i).Text = Combo2(i).Tag Next i For i = 0 To 49 Combo3(i).Text = Combo3(i).Tag Next i EnableSave (False) cb(1).Enabled = False End Select GoTo ok errDeal: MsgBox Error Unknown ok: = 0 End Sub Private Sub displayInfo() For j = 0 To sjCnt 1 strSql = select cteacher from trclass where cclasscode=39。 amp。 ClassCode amp。 39。 and csubject=39。 amp。 Trim(Label2(j).Caption) amp。 39。 39。 = strSql 39。 = strSql Set rsTrAry = (strSql) 39。 Dim tpRs As 39。 Set tpRs = (select cteacher from trclass where cclasscode=39。 amp。 ClassCode amp。 39。 and csubject=3。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。