下载 > 资源分类 >  开发技术 >  VB > 学生教育管理系统

学生教育管理系统

2008-01-13 上传大小:285KB
源代码清单如下:<br><br>Private Sub MDIForm_Load()<br><br>End Sub<br><br>Private Sub mnuExamination_Click()<br>    frmMarks.Show<br>End Sub<br><br>P
rivate Sub mnuExit_Click()<br>    If MsgBox("确实要退出吗?", vbOKCancel + vbQuestion, "系统退出") = vbOK Then<br>        Unload Me<br>    Else<br>        Exit Sub<br>    End If<br>End Sub<br><br>Private Sub mnuStudentsAdmission_Click()<br>    frmSADateZL.Show<br>End Sub<br><br><br><br>    Option Explicit<br>    Dim Cnt As ADODB.Recordset<br>    Dim Ct As String<br>    Dim Acc As Boolean<br>'    Dim Cnt1 As ADODB.Recordset<br>'    Dim Ct1 As String<br><br>Private Sub cmdEdit_Click()<br>    TextEnable1<br>    TextK1<br>    cmdNew.Enabled = False<br>    cmdEdit.Enabled = False<br>    cmdSave.Enabled = True<br>    Acc = False<br>End Sub<br><br>Private Sub cmdNew_Click()<br>    TextEnable1<br>    TextK<br>    cmdNew.Enabled = False<br>    cmdEdit.Enabled = False<br>    cmdSave.Enabled = True<br>    Acc = True<br>End Sub<br><br>Private Sub cmdSave_Click()<br>    If Acc = True Then<br>        FillRecord<br>    Else<br>        FillRecord1<br>    End If<br>    cmdNew.Enabled = True<br>    cmdEdit.Enabled = True<br>    cmdSave.Enabled = False<br>    TextEnable<br><br>End Sub<br><br>Private Sub Form_Load()<br>    Set Cnt = New Recordset<br>    Ct = "select * from Exam"<br>    Cnt.Open Ct, Str, adOpenKeyset, adLockOptimistic, adCmdText<br><br>    FillText<br>    TextEnable<br>    TextEnable3<br><br>    frmMarks.Width = 6930<br>    frmMarks.Height = 6885<br><br>    Acc = False<br><br><br>'    Set Cnt1 = New Recordset<br>'    Ct1 = "select * from Admission "<br>'    Cnt1.Open Ct1, Str, adOpenKeyset, adLockOptimistic, adCmdText<br>'    Call Marks(Ct1)<br>End Sub<br><br>Private Sub cmdExit_Click()<br>    If MsgBox("确实要退出吗?", vbOKCancel + vbQuestion, "窗体退出") = vbOK Then<br>        Unload Me<br>    Else<br>        Exit Sub<br>    End If<br>End Sub<br><br>Private Sub cmdFrist_Click()<br>    If Cnt.RecordCount = 0 Then Exit Sub<br>    Cnt.MoveFirst<br>    FillText<br>End Sub<br><br>Private Sub cmdLast_Click()<br>    If Cnt.RecordCount = 0 Then Exit Sub<br>    Cnt.MoveLast<br>    FillText<br>End Sub<br><br>Private Sub cmdNext_Click()<br>    If Cnt.RecordCount = 0 Then Exit Sub<br>    Cnt.MoveNext<br>    If Cnt.EOF = True Then<br>        MsgBox "纪录已是尾记录", vbOKOnly + vbExclamation, "浏览记录"<br>        Cnt.MoveLast<br>        FillText<br>    End If<br>    FillText<br>End Sub<br><br>Private Sub cmdPrevious_Click()<br>    If Cnt.RecordCount = 0 Then Exit Sub<br>    Cnt.MovePrevious<br>    If Cnt.BOF = True Then<br>        MsgBox "纪录已是首记录", vbOKOnly + vbExclamation, "浏览记录"<br>        Cnt.MoveFirst<br>        FillText<br>    End If<br>    FillText<br>End Sub<br><br>Private Sub TextEnable()<br>    Dim i As Integer<br>    For i = 0 To 7<br>        txtRecord1(i).Enabled = False<br>    Next<br>End Sub<br><br>Private Sub TextEnable1()<br>    Dim i As Integer<br>    For i = 0 To 7<br>        txtRecord1(i).Enabled = True<br>    Next<br>End Sub<br><br>Private Sub TextEnable3()<br>    Dim i As Integer<br>    For i = 0 To 3<br>        txtFillRecord1(i).Enabled = False<br>    Next<br>End Sub<br><br>Private Sub FillText()<br>    Dim i As Integer<br>    If Cnt.RecordCount <= 0 Then Exit Sub<br>    txtRecord1(0).Text = Cnt(1)<br>    txtRecord1(1).Text = Cnt(2)<br>    txtRecord1(2).Text = Cnt(3)<br>    txtRecord1(3).Text = Cnt(4)<br>    txtRecord1(4).Text = Cnt(5)<br>    txtRecord1(5).Text = Cnt(6)<br>    txtRecord1(6).Text = Cnt(7)<br>    txtRecord1(7).Text = Cnt(8)<br>End Sub<br><br>Private Sub TextK()<br>    Dim i As Integer<br>    If Cnt.RecordCount = 0 Then Exit Sub<br><br>    For i = 0 To 7<br>        txtRecord1(i) = ""<br>        txtRecord1(0).SetFocus<br>    Next<br>End Sub<br><br>Private Sub TextK1()<br>    If Cnt.RecordCount = 0 Then Exit Sub<br>    txtRecord1(0).SetFocus<br>End Sub<br><br>Private Sub FillRecord()<br>    Dim i As Integer<br>    Cnt.AddNew<br>    Cnt(1) = txtRecord1(0).Text<br>    Cnt(2) = txtRecord1(1).Text<br>    Cnt(3) = txtRecord1(2).Text<br>    Cnt(4) = txtRecord1(3).Text<br>    Cnt(5) = txtRecord1(4).Text<br>    Cnt(6) = txtRecord1(5).Text<br>    Cnt(7) = txtRecord1(6).Text<br>    Cnt(8) = txtRecord1(7).Text<br>    Cnt.Update<br>    Cnt.MoveFirst<br>    FillText<br>End Sub<br><br>Private Sub FillRecord1()<br>    Dim i As Integer<br>    Cnt(1) = txtRecord1(0).Text<br>    Cnt(2) = txtRecord1(1).Text<br>    Cnt(3) = txtRecord1(2).Text<br>    Cnt(4) = txtRecord1(3).Text<br>    Cnt(5) = txtRecord1(4).Text<br>    Cnt(6) = txtRecord1(5).Text<br>    Cnt(7) = txtRecord1(6).Text<br>    Cnt(8) = txtRecord1(7).Text<br>    Cnt.Update<br>    Cnt.MoveFirst<br>    FillText<br>End Sub<br><br>'Private Sub Marks(Cr As String)<br>'    Ct1 = "select Sid from Admission where sid='" & Cr & "'"<br>'<br>'    If Trim(Cnt1("sid")) = Trim(txtFillRecord.Text) Then<br>'        txtFillRecord1(0).Text = Cnt1("Name")<br>'        txtFillRecord1(1).Text = Cnt1("Address")<br>'        txtFillRecord1(2).Text = Cnt1("Batch")<br>'        txtFillRecord1(3).Text = Cnt1("Faculty")<br>'    Else<br>'        txtFillRecord1(0).Text = ""<br>'        txtFillRecord1(1).Text = ""<br>'        txtFillRecord1(2).Text = ""<br>'        txtFillRecord1(3).Text = ""<br>'    End If<br>'End Sub<br><br>Private Sub txtFillRecord_Change()<br>''    Dim Sa As String<br>''        Sa = txtFillRecord.Text<br>''    Call Marks(Sa)<br>    Dim findStr As String<br>'    Dim cnn2 As New ADODB.Connection<br>    Dim rsSearch As New ADODB.Recordset<br>'    If Text1(0).Text = Empty Then<br>'        MsgBox "Cannot be Left Empty"<br>'        txtFind.SetFocus<br>'        Exit Sub<br>'    End If<br>    Set rsSearch = New Recordset<br><br>    findStr = "select * from Admission where sid='" & txtFillRecord.Text & "'"<br><br>'    cnn2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\SAdmin.mdb;Persist Security Info=False"<br>'    cnn2.Open<br><br>    rsSearch.Open findStr, Str, adOpenDynamic<br>    If rsSearch.EOF And rsSearch.BOF Then<br>        txtFillRecord1(0).Text = ""<br>        txtFillRecord1(1).Text = ""<br>        txtFillRecord1(2).Text = ""<br>        txtFillRecord1(3).Text = ""<br>    Else<br>        txtFillRecord1(0).Text = rsSearch(1)<br>        txtFillRecord1(1).Text = rsSearch(2)<br>        txtFillRecord1(2).Text = rsSearch(3)<br>        txtFillRecord1(3).Text = rsSearch(4)<br>    '    txtFillRecord1(4).Text = rsSearch(4)<br>    '    txtFillRecord1(5).Text = rsSearch(5)<br>    End If<br>'    Dim Find As ADODB.Recordset<br>'    Dim Find1 As String<br>'    Set Find = New Recordset<br>'<br>'    Find1 = "select * from admission where sid='" & txtFillRecord.Text & "'"<br>'    Find.Open Find1, Str, adOpenKeyset, adLockOptimistic, adCmdText<br>'    If Find.EOF And Find.BOF Then<br>'        txtFillRecord1(0).Text = ""<br>'        txtFillRecord1(1).Text = ""<br>'        txtFillRecord1(2).Text = ""<br>'        txtFillRecord1(3).Text = ""<br>'    Else<br>'        txtFillRecord1(0).Text = Find(1)<br>'        txtFillRecord1(1).Text = Find(2)<br>'        txtFillRecord1(2).Text = Find(3)<br>'        txtFillRecord1(3).Text = Find(4)<br>'    End If<br>End Sub<br><br>Option Explicit<br>Dim Cnn As ADODB.Recordset<br>Dim Cn As String<br>Dim Acc As Boolean<br><br>Private Sub cmdEdit_Click()<br>    TextEnable1<br>    TextK1<br>    cmdNew.Enabled = False<br>    cmdEdit.Enabled = False<br>    cmdSave.Enabled = True<br>    Acc = False<br>End Sub<br><br>Private Sub cmdExit_Click()<br>    If MsgBox("确实要退出吗?", vbOKCancel + vbQuestion, "窗体退出") = vbOK Then<br>        Unload Me<br>    Else<br>        Exit Sub<br>    End If<br>End Sub<br><br>Private Sub cmdFrist_Click()<br>    If Cnn.RecordCount = 0 Then Exit Sub<br>    Cnn.MoveFirst<br>    FillText<br>End Sub<br><br>Private Sub cmdLast_Click()<br>    If Cnn.RecordCount = 0 Then Exit Sub<br>    Cnn.MoveLast<br>    FillText<br>End Sub<br><br>Private Sub cmdNew_Click()<br>    TextEnable1<br>    TextK<br>    cmdNew.Enabled = False<br>    cmdEdit.Enabled = False<br>    cmdSave.Enabled = True<br>    Acc = True<br>End Sub<br><br>Private Sub cmdNext_Click()<br>    If Cnn.RecordCount = 0 Then Exit Sub<br>    Cnn.MoveNext<br>    If Cnn.EOF = True Then<br>        MsgBox "纪录已是尾记录", vbOKOnly + vbExclamation, "浏览记录"<br>        Cnn.MoveLast<br>        FillText<br>    End If<br>    FillText<br>End Sub<br><br>Private Sub cmdPrevious_Click()<br>    If Cnn.RecordCount = 0 Then Exit Sub<br>    Cnn.MovePrevious<br>    If Cnn.BOF = True Then<br>        MsgBox "纪录已是首记录", vbOKOnly + vbExclamation, "浏览记录"<br>        Cnn.MoveFirst<br>        FillText<br>    End If<br>    FillText<br>End Sub<br><br>Private Sub cmdSave_Click()<br>    If Acc = True Then<br>        FillRecord<br>    Else<br>        FillRecord1<br>    End If<br>    cmdNew.Enabled = True<br>    cmdEdit.Enabled = True<br>    cmdSave.Enabled = False<br>    TextEnable<br>End Sub<br><br>Private Sub Form_Load()<br>    Set Cnn = New Recordset<br>    <br>    Cn = "select * from Admission"<br>    Cnn.Open Cn, Str, adOpenKeyset, adLockOptimistic, adCmdText<br>    <br>    frmSADateZL.Width = 7035<br>    frmSADateZL.Height = 5160<br>    FillText<br>    TextEnable<br>    Acc = False<br>End Sub<br><br>Private Sub FillText()<br>    Dim i As Integer<br>    If Cnn.RecordCount = 0 Then Exit Sub<br>    <br>    For i = 0 To 5<br>        txtFillRecord(i) = Cnn(i)<br>    Next<br>End Sub<br><br>Private Sub TextK()<br>    Dim i As Integer<br>    If Cnn.RecordCount = 0 Then Exit Sub<br>    <br>    For i = 0 To 5<br>        txtFillRecord(i) = ""<br>        txtFillRecord(0).SetFocus<br>    Next<br>End Sub<br><br>Private Sub TextK1()<br>    If Cnn.RecordCount = 0 Then Exit Sub<br>    txtFillRecord(0).SetFocus<br>End Sub<br>    <br>Private Sub FillRecord()<br>    Dim i As Integer<br>    Cnn.AddNew<br>    For i = 0 To 5<br>        Cnn(i) = txtFillRecord(i)<br>    Next<br>    Cnn.Update<br>    Cnn.MoveFirst<br>    FillText<br>End Sub<br><br>Private Sub FillRecord1()<br>    Dim i As Integer<br>    For i = 0 To 5<br>        Cnn(i) = txtFillRecord(i)<br>    Next<br>    Cnn.Update<br>    Cnn.MoveFirst<br>    FillText<br>End Sub<br><br>Private Sub TextEnable()<br>    Dim i As Integer<br>    For i = 0 To 5<br>        txtFillRecord(i).Enabled = False<br>    Next<br>End Sub<br><br>Private Sub TextEnable1()<br>    Dim i As Integer<br>    For i = 0 To 5<br>        txtFillRecord(i).Enabled = True<br>    Next<br>End Sub<br><br>Option Explicit<br>Public Str As ADODB.Connection<br><br>Public Sub DateConnection()<br>    Set Str = New Connection<br>    Str.ConnectionTimeout = 50<br>    Str.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\SAdmin.mdb;"<br>    Str.CursorLocation = adUseClient<br>End Sub<br><br>Public Sub Main()<br>    Call DateConnection<br>    <br>    frmMain.Show<br>End Sub<br><br>
...展开收缩
综合评分:0(0位用户评分)
直接下载 开通VIP会员 免积分下载

评论共有0条

评论资源

您不能发表评论,可能是以下原因:

登录后才能评论

待评论资源
 

热门专辑

关闭
img

spring mvc+mybatis+mysql+maven+bootstrap 整合实现增删查改简单实例.zip

CSDN VIP年卡 4000万程序员的必选现在开通,立省522元
下载
img

学生教育管理系统

会员到期时间: 剩余下载个数: 剩余C币:0 剩余积分:
VIP下载

积分不足!

资源所需积分 当前拥有积分
您可以选择
开通VIP年卡
4000万
程序员的必选
600万
绿色安全资源
现在开通
立省522元
或者
购买C币兑换积分 C币抽奖
img
资源所需积分 当前拥有积分 当前拥有C币
5 4 45
(仅够下载10个资源)
VIP年卡
全站1200个资源免积分下载
下载
img
资源所需积分 当前拥有积分 当前拥有C币
5 0 0
VIP年卡
全站1200个资源免积分下载
C币充值开通VIP年卡
img
资源所需积分 当前拥有积分 当前拥有C币
5 4 45
您的积分不足,将扣除 10 C币
VIP年卡
全站1200个资源免积分下载
下载
下载

兑换成功

你当前的下载分为234开始下载资源
你还不是VIP会员
开通VIP会员权限,免积分下载
立即开通

你下载资源过于频繁,请输入验证码

你下载资源过于频繁,请输入验证码

您因违反CSDN下载频道规则而被锁定帐户,如有疑问,请联络:webmaster@csdn.net!

举报

若举报审核通过,可奖励20下载分

  • 举报人:
  • 被举报人:
  • 举报的资源分:
  • *类型:
  • *详细原因: