VB+SQL server学生信息管理系统毕业论文附源代码 第26页

 

Private Sub firstCommand_Click()

mrc.MoveFirst

Call viewData

End Sub

 

Private Sub Form_Load()

Dim txtSQL As String

Dim MsgText As String

 

comboExamtype.Enabled = False

comboClassno.Enabled = False

comboSID.Enabled = False

comboCourse.Enabled = False

txtName.Enabled = False

txtResult.Enabled = False

updateCommand.Enabled = False

cancelCommand.Enabled = False

 

 

txtSQL = "select * from result_Info "

Set mrc = ExecuteSQL(txtSQL, MsgText)

 

If mrc.EOF = False Then

mrc.MoveFirst

Call viewData

myBookmark = mrc.Bookmark

Else

MsgBox "没有纪录?quot;, vbOKOnly + vbExclamation, "警告"

Exit Sub

End If

 

End Sub

 

Public Sub viewData()

comboExamtype.Text = mrc!exam_No

comboClassno.Text = mrc!class_No

comboSID.Text = mrc!student_ID

comboCourse.Text = mrc!course_Name

txtName.Text = mrc!student_Name

txtResult.Text = mrc!result

End Sub

 

Private Sub lastCommand_Click()

mrc.MoveLast

Call viewData

End Sub

 

Private Sub nextCommand_Click()

mrc.MoveNext

If mrc.EOF Then

mrc.MoveFirst

End If

Call viewData

End Sub

 

Private Sub previousCommand_Click()

mrc.MovePrevious

If mrc.BOF Then

mrc.MoveLast

End If

Call viewData

End Sub

 

Private Sub updateCommand_Click()

Dim MsgText As String

 

If Not Testtxt(comboExamtype.Text) Then

MsgBox "请输入考试编号!", vbOKOnly + vbExclamation, "警告"

Exit Sub

End If

 

If Not Testtxt(comboClassno.Text) Then

MsgBox "请选择班号!", vbOKOnly + vbExclamation, "警告"

Exit Sub

End If

 

If Not Testtxt(comboSID.Text) Then

MsgBox "请选择学号!", vbOKOnly + vbExclamation, "警告"

Exit Sub

End If

 

If Not Testtxt(comboCourse.Text) Then

MsgBox "请选择课程!", vbOKOnly + vbExclamation, "警告"

Exit Sub

End If

 

If Not Testtxt(txtResult.Text) Then

MsgBox "请输入分数!", vbOKOnly + vbExclamation, "警告"

Exit Sub

End If

 

If Not IsNumeric(txtResult.Text) Then

MsgBox "分数请输入数字!", vbOKOnly + vbExclamation, "警告"

Exit Sub

End If

 

 

mrc.Fields(0) = comboExamtype.Text

mrc.Fields(1) = comboSID.Text

mrc.Fields(2) = txtName.Text

mrc.Fields(3) = comboClassno.Text

mrc.Fields(4) = comboCourse.Text

mrc.Fields(5) = txtResult.Text

mrc.Update

mrc.Close 

 << 上一页  [21] [22] [23] [24] [25] [26] [27] [28] [29] 下一页

Copyright © 2007-2012 www.chuibin.com 六维论文网 版权所有