您好,欢迎光临本网站![请登录][注册会员]  
文件名称: 学生教育管理系统
  所属分类: VB
  开发工具:
  文件大小: 285kb
  下载次数: 0
  上传时间: 2008-01-13
  提 供 者: al***
 详细说明: 源代码清单如下:

Private Sub MDIForm_Load()

End Sub

Private Sub mnuExamination_Click()
frmMarks.Show
End Sub

Private Sub mnuExit_Click()
If MsgBox("确实要退出吗?", vbOKCancel + vbQuestion, "系统退出") = vbOK Then
Unload Me
Else
Exit Sub
End If
End Sub

Private Sub mnuStudentsAdmission_Click()
frmSADateZL.Show
E nd Sub



Option Explicit
Dim Cnt As ADODB.Recordset
Dim Ct As String
Dim Acc As Boolean
' Dim Cnt1 As ADODB.Recordset
' Dim Ct1 As String

Private Sub cmdEdit_Click()
TextEnable1
TextK1
cmdNew.Enabled = False
cmdEdit.Enabled = False
cmdSave.Enabled = True
Acc = False
End Sub

Private Sub cmdNew_Click()
TextEnable1
TextK
cmdNew.Enabled = False
cmdEdit.Enabled = False
cmdSave.Enabled = True
Acc = True
End Sub

Private Sub cmdSave_Click()
If Acc = True Then
FillRecord
Else
FillRecord1
End If
cmdNew.Enabled = True
cmdEdit.Enabled = True
cmdSave.Enabled = False
TextEnable

End Sub

Private Sub Form_Load()
Set Cnt = New Recordset
Ct = "select * from Exam"
Cnt.Open Ct, Str, adOpenKeyset, adLockOptimistic, adCmdText

FillText
TextEnable
TextEnable3

frmMarks.Width = 6930
frmMarks.Height = 6885

Acc = False


' Set Cnt1 = New Recordset
' Ct1 = "select * from Admission "
' Cnt1.Open Ct1, Str, adOpenKeyset, adLockOptimistic, adCmdText
' Call Marks(Ct1)
End Sub

Private Sub cmdExit_Click()
If MsgBox("确实要退出吗?", vbOKCancel + vbQuestion, "窗体退出") = vbOK Then
Unload Me
Else
Exit Sub
End If
End Sub

Private Sub cmdFrist_Click()
If Cnt.RecordCount = 0 Then Exit Sub
Cnt.MoveFirst
FillText
End Sub

Private Sub cmdLast_Click()
If Cnt.RecordCount = 0 Then Exit Sub
Cnt.MoveLast
FillText
End Sub

Private Sub cmdNext_Click()
If Cnt.RecordCount = 0 Then Exit Sub
Cnt.MoveNext
If Cnt.EOF = True Then
MsgBox "纪录已是尾记录", vbOKOnly + vbExclamation, "浏览记录"
Cnt.MoveLast
FillText
End If
FillText
End Sub

Private Sub cmdPrevious_Click()
If Cnt.RecordCount = 0 Then Exit Sub
Cnt.MovePrevious
If Cnt.BOF = True Then
MsgBox "纪录已是首记录", vbOKOnly + vbExclamation, "浏览记录"
Cnt.MoveFirst
FillText
End If
FillText
End Sub

Private Sub TextEnable()
Dim i As Integer
For i = 0 To 7
txtRecord1(i).Enabled = False
Next
End Sub

Private Sub TextEnable1()
Dim i As Integer
For i = 0 To 7
txtRecord1(i).Enabled = True
Next
End Sub

Private Sub TextEnable3()
Dim i As Integer
For i = 0 To 3
txtFillRecord1(i).Enabled = False
Next
End Sub

Private Sub FillText()
Dim i As Integer
If Cnt.RecordCount <= 0 Then Exit Sub
txtRecord1(0).Text = Cnt(1)
txtRecord1(1).Text = Cnt(2)
txtRecord1(2).Text = Cnt(3)
txtRecord1(3).Text = Cnt(4)
txtRecord1(4).Text = Cnt(5)
txtRecord1(5).Text = Cnt(6)
txtRecord1(6).Text = Cnt(7)
txtRecord1(7).Text = Cnt(8)
End Sub

Private Sub TextK()
Dim i As Integer
If Cnt.RecordCount = 0 Then Exit Sub

For i = 0 To 7
txtRecord1(i) = ""
txtRecord1(0).SetFocus
Next
End Sub

Private Sub TextK1()
If Cnt.RecordCount = 0 Then Exit Sub
txtRecord1(0).SetFocus
End Sub

Private Sub FillRecord()
Dim i As Integer
Cnt.AddNew
Cnt(1) = txtRecord1(0).Text
Cnt(2) = txtRecord1(1).Text
Cnt(3) = txtRecord1(2).Text
Cnt(4) = txtRecord1(3).Text
Cnt(5) = txtRecord1(4).Text
Cnt(6) = txtRecord1(5).Text
Cnt(7) = txtRecord1(6).Text
Cnt(8) = txtRecord1(7).Text
Cnt.Update
Cnt.MoveFirst
FillText
End Sub

Private Sub FillRecord1()
Dim i As Integer
Cnt(1) = txtRecord1(0).Text
Cnt(2) = txtRecord1(1).Text
Cnt(3) = txtRecord1(2).Text
Cnt(4) = txtRecord1(3).Text
Cnt(5) = txtRecord1(4).Text
Cnt(6) = txtRecord1(5).Text
Cnt(7) = txtRecord1(6).Text
Cnt(8) = txtRecord1(7).Text
Cnt.Update
Cnt.MoveFirst
FillText
End Sub

'Private Sub Marks(Cr As String)
' Ct1 = "select Sid from Admission where sid='" & Cr & "'"
'
' If Trim(Cnt1("sid")) = Trim(txtFillRecord.Text) Then
' txtFillRecord1(0).Text = Cnt1("Name")
' txtFillRecord1(1).Text = Cnt1("Address")
' txtFillRecord1(2).Text = Cnt1("Batch")
' txtFillRecord1(3).Text = Cnt1("Faculty")
' Else
' txtFillRecord1(0).Text = ""
' txtFillRecord1(1).Text = ""
' txtFillRecord1(2).Text = ""
' txtFillRecord1(3).Text = ""
' End If
'End Sub

Private Sub txtFillRecord_Change()
'' Dim Sa As String
'' Sa = txtFillRecord.Text
'' Call Marks(Sa)
Dim findStr As String
' Dim cnn2 As New ADODB.Connection
Dim rsSearch As New ADODB.Recordset
' If Text1(0).Text = Empty Then
' MsgBox "Cannot be Left Empty"
' txtFind.SetFocus
' Exit Sub
' End If
Set rsSearch = New Recordset

findStr = "select * from Admission where sid='" & txtFillRecord.Text & "'"

' cnn2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\SAdmin.mdb;Persist Security Info=False"
' cnn2.Open

rsSearch.Open findStr, Str, adOpenDynamic
If rsSearch.EOF And rsSearch.BOF Then
txtFillRecord1(0).Text = ""
txtFillRecord1(1).Text = ""
txtFillRecord1(2).Text = ""
txtFillRecord1(3).Text = ""
Else
txtFillRecord1(0).Text = rsSearch(1)
txtFillRecord1(1).Text = rsSearch(2)
txtFillRecord1(2).Text = rsSearch(3)
txtFillRecord1(3).Text = rsSearch(4)
' txtFillRecord1(4).Text = rsSearch(4)
' txtFillRecord1(5).Text = rsSearch(5)
End If
' Dim Find As ADODB.Recordset
' Dim Find1 As String
' Set Find = New Recordset
'
' Find1 = "select * from admission where sid='" & txtFillRecord.Text & "'"
' Find.Open Find1, Str, adOpenKeyset, adLockOptimistic, adCmdText
' If Find.EOF And Find.BOF Then
' txtFillRecord1(0).Text = ""
' txtFillRecord1(1).Text = ""
' txtFillRecord1(2).Text = ""
' txtFillRecord1(3).Text = ""
' Else
' txtFillRecord1(0).Text = Find(1)
' txtFillRecord1(1).Text = Find(2)
' txtFillRecord1(2).Text = Find(3)
' txtFillRecord1(3).Text = Find(4)
' End If
End Sub

Option Explicit
Dim Cnn As ADODB.Recordset
Dim Cn As String
Dim Acc As Boolean

Private Sub cmdEdit_Click()
TextEnable1
TextK1
cmdNew.Enabled = False
cmdEdit.Enabled = False
cmdSave.Enabled = True
Acc = False
End Sub

Private Sub cmdExit_Click()
If MsgBox("确实要退出吗?", vbOKCancel + vbQuestion, "窗体退出") = vbOK Then
Unload Me
Else
Exit Sub
End If
End Sub

Private Sub cmdFrist_Click()
If Cnn.RecordCount = 0 Then Exit Sub
Cnn.MoveFirst
FillText
End Sub

Private Sub cmdLast_Click()
If Cnn.RecordCount = 0 Then Exit Sub
Cnn.MoveLast
FillText
End Sub

Private Sub cmdNew_Click()
TextEnable1
TextK
cmdNew.Enabled = False
cmdEdit.Enabled = False
cmdSave.Enabled = True
Acc = True
End Sub

Private Sub cmdNext_Click()
If Cnn.RecordCount = 0 Then Exit Sub
Cnn.MoveNext
If Cnn.EOF = True Then
MsgBox "纪录已是尾记录", vbOKOnly + vbExclamation, "浏览记录"
Cnn.MoveLast
FillText
End If
FillText
End Sub

Private Sub cmdPrevious_Click()
If Cnn.RecordCount = 0 Then Exit Sub
Cnn.MovePrevious
If Cnn.BOF = True Then
MsgBox "纪录已是首记录", vbOKOnly + vbExclamation, "浏览记录"
Cnn.MoveFirst
FillText
End If
FillText
End Sub

Private Sub cmdSave_Click()
If Acc = True Then
FillRecord
Else
FillRecord1
End If
cmdNew.Enabled = True
cmdEdit.Enabled = True
cmdSave.Enabled = False
TextEnable
End Sub

Private Sub Form_Load()
Set Cnn = New Recordset

Cn = "select * from Admission"
Cnn.Open Cn, Str, adOpenKeyset, adLockOptimistic, adCmdText

frmSADateZL.Width = 7035
frmSADateZL.Height = 5160
FillText
TextEnable
Acc = False
End Sub

Private Sub FillText()
Dim i As Integer
If Cnn.RecordCount = 0 Then Exit Sub

For i = 0 To 5
txtFillRecord(i) = Cnn(i)
Next
End Sub

Private Sub TextK()
Dim i As Integer
If Cnn.RecordCount = 0 Then Exit Sub

For i = 0 To 5
txtFillRecord(i) = ""
txtFillRecord(0).SetFocus
Next
End Sub

Private Sub TextK1()
If Cnn.RecordCount = 0 Then Exit Sub
txtFillRecord(0).SetFocus
End Sub

Private Sub FillRecord()
Dim i As Integer
Cnn.AddNew
For i = 0 To 5
Cnn(i) = txtFillRecord(i)
Next
Cnn.Update
Cnn.MoveFirst
FillText
End Sub

Private Sub FillRecord1()
Dim i As Integer
For i = 0 To 5
Cnn(i) = txtFillRecord(i)
Next
Cnn.Update
Cnn.MoveFirst
FillText
End Sub

Private Sub TextEnable()
Dim i As Integer
For i = 0 To 5
txtFillRecord(i).Enabled = False
Next
End Sub

Private Sub TextEnable1()
Dim i As Integer
For i = 0 To 5
txtFillRecord(i).Enabled = True
Next
End Sub

Option Explicit
Public Str As ADODB.Connection

Public Sub DateConnection()
Set Str = New Connection
Str.ConnectionTimeout = 50
Str.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\SAdmin.mdb;"
Str.CursorLocation = adUseClient
End Sub

Public Sub Main()
Call DateConnection

frmMain.Show
End Sub

...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: 学生
 输入关键字,在本站1000多万海量源码库中尽情搜索: