毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

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

更新时间:2007-10-13:  来源:毕业论文
 

 

.........................................................................................................

 

 

.......................... frmModifyclassinfo 修改班级信息窗口代码 ...............................

 

Dim mrc As ADODB.Recordset

Dim myBookmark As Variant

Dim mcclean As Boolean

 

Private Sub cancelCommand_Click()

If Not mcclean Then

Frame2.Enabled = True

firstCommand.Enabled = True

previousCommand.Enabled = True

nextCommand.Enabled = True

lastCommand.Enabled = True

 

txtClassno.Enabled = False

comboGrade.Enabled = False

txtDirector.Enabled = False

txtClassroom.Enabled = False

 

mrc.Bookmark = myBookmark

Call viewData

Else

MsgBox "什么都没有修改,有什么好取消的!", vbOKOnly + vbExclamation, "警告"

End If

End Sub

 

Private Sub deleteCommand_Click()

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.Bookmark = myBookmark

Call viewData

Else

myBookmark = mrc.Bookmark

mrc.MovePrevious

mrc.Delete

mrc.Bookmark = myBookmark

Call viewData

End If

Else

mrc.Bookmark = myBookmark

Call viewData

End If

End Sub

 

Private Sub editCommand_Click()

mcclean = False

Frame2.Enabled = False

firstCommand.Enabled = False

previousCommand.Enabled = False

nextCommand.Enabled = False

lastCommand.Enabled = False

 

txtClassno.Enabled = True

comboGrade.Enabled = True

txtDirector.Enabled = True

txtClassroom.Enabled = True

 

comboGrade.AddItem "初中一年级"

comboGrade.AddItem "初中二年级"

comboGrade.AddItem "初中三年级"

comboGrade.AddItem "高中一年级"

comboGrade.AddItem "高中二年级"

comboGrade.AddItem "高中三年级"

 

myBookmark = mrc.Bookmark

End Sub

 

Private Sub firstCommand_Click()

mrc.MoveFirst

Call viewData

End Sub

 

Private Sub Form_Load()

Dim txtSQL As String

Dim MsgText As String

 

txtClassno.Enabled = False

comboGrade.Enabled = False

txtDirector.Enabled = False

txtClassroom.Enabled = False

 

txtSQL = "select * from class_Info "

Set mrc = ExecuteSQL(txtSQL, MsgText)

mrc.MoveFirst

Call viewData

myBookmark = mrc.Bookmark

mcclean = True

 

End Sub

 

Public Sub viewData()

txtClassno.Text = mrc.Fields(0)

comboGrade.Text = mrc.Fields(1)

txtDirector.Text = mrc.Fields(2)

txtClassroom.Text = mrc.Fields(3)

 

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 txtSQL As String

Dim MsgText As String

Dim mrcc As ADODB.Recordset

 

If mcclean Then

MsgBox "请先修改班级信息", vbOKOnly + vbExclamation, "警告"

Exit Sub

End If

 

If Not Testtxt(txtClassno.Text) Then

MsgBox "请输入班号!", vbOKOnly + vbExclamation, "警告"

txtClassno.SetFocus

Exit Sub

End If

 

If Not IsNumeric(Trim(txtClassno.Text)) Then

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

Exit Sub

txtClassno.SetFocus

End If

 

 

If Not Testtxt(comboGrade.Text) Then

MsgBox "请选择年级!", vbOKOnly + vbExclamation, "警告"

comboGrade.SetFocus

 

Exit Sub

End If

 

If Not Testtxt(txtDirector.Text) Then

MsgBox "请输入班主任姓名!", vbOKOnly + vbExclamation, "警告"

txtDirector.SetFocus

Exit Sub

End If

 

 

If Not Testtxt(txtClassroom.Text) Then

MsgBox "请输入教室号码!", vbOKOnly + vbExclamation, "警告"

txtClassroom.SetFocus

Exit Sub

End If

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

VB+SQL server学生信息管理系统毕业论文附源代码 第22页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。