VB+SQL server学生信息管理系统毕业论文附源代码 第25页
mcclean = True
End If
End Sub
.........................................................................................................
........................... frmModifyresult 修改成绩信息窗口代码 .................................
Dim mrc As ADODB.Recordset
Dim myBookmark As Variant
Private Sub cancelCommand_Click()
mrc.Bookmark = myBookmark
Call viewData
firstCommand.Enabled = True
lastCommand.Enabled = True
previousCommand.Enabled = True
nextCommand.Enabled = True
updateCommand.Enabled = False
cancelCommand.Enabled = False
comboExamtype.Enabled = False
comboClassno.Enabled = False
comboSID.Enabled = False
comboCourse.Enabled = False
txtName.Enabled = False
txtResult.Enabled = False
End Sub
Private Sub comboSID_Click()
Dim mrcc As ADODB.Recordset
Dim txtSQL As String
Dim MsgText As String
txtSQL = "select * from student_Info where student_ID = '" & comboSID.Text & "'"
Set mrcc = ExecuteSQL(txtSQL, MsgText)
txtName.Text = mrcc!student_Name
mrcc.Close
End Sub
Private Sub deleteCommand_Click()
Dim MsgText As String
myBookmark = mrc.Bookmark
str2$ = MsgBox("是否删除当前记录?", vbOKCancel, "删除当前记录")
If str2$ = vbOK Then
mrc.MoveNext
If mrc.EOF Then
mrc.MoveFirst
myBookmark = mrc.Bookmark
mrc.MoveLast
mrc.Delete
mrc.Close
txtSQL = "select * from result_Info"
Set mrc = ExecuteSQL(txtSQL, MsgText)
mrc.MoveLast
Call viewData
Else
myBookmark = mrc.Bookmark
mrc.MovePrevious
mrc.Delete
mrc.Close
txtSQL = "select * from result_Info"
Set mrc = ExecuteSQL(txtSQL, MsgText)
mrc.MoveLast
Call viewData
End If
Else
mrc.Bookmark = myBookmark
Call viewData
End If
End Sub
Private Sub editCommand_Click()
Dim mrcc As ADODB.Recordset
Dim txtSQL As String
Dim MsgText As String
firstCommand.Enabled = False
lastCommand.Enabled = False
previousCommand.Enabled = False
nextCommand.Enabled = False
updateCommand.Enabled = True
cancelCommand.Enabled = True
comboExamtype.Enabled = True
comboClassno.Enabled = True
comboSID.Enabled = True
comboCourse.Enabled = True
txtName.Enabled = True
txtResult.Enabled = True
comboExamtype.AddItem "2000期中"
comboExamtype.AddItem "2000期末"
comboExamtype.AddItem "2001期中"
comboExamtype.AddItem "2001期末"
txtSQL = "select * from class_Info "
Set mrcc = ExecuteSQL(txtSQL, MsgText)
While (mrcc.EOF = False)
comboClassno.AddItem mrcc!class_No
mrcc.MoveNext
Wend
mrcc.Close
myBookmark = mrc.Bookmark
End Sub
<< 上一页 [21] [22] [23] [24] [25] [26] [27] [28] [29] 下一页