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

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

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

Public Sub viewData()

txtCourseno.Text = mrc.Fields(0)

txtCoursename.Text = mrc.Fields(1)

comboCoursetype.Text = mrc.Fields(2)

txtCoursedes.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(txtCourseno.Text) Then

MsgBox "请输入课程编号!", vbOKOnly + vbExclamation, "警告"

txtCourseno.SetFocus

Exit Sub

End If

 

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

MsgBox "课程编号请输入数字!", vbOKOnly + vbExclamation, "警告"

txtCourseno.SetFocus

Exit Sub

End If

 

If Not Testtxt(txtCoursename.Text) Then

MsgBox "请输入课程名称!", vbOKOnly + vbExclamation, "警告"

txtCoursename.SetFocus

Exit Sub

End If

 

If Not Testtxt(comboCoursetype.Text) Then

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

comboCoursetype.SetFocus

Exit Sub

End If

 

If Not Testtxt(txtCoursedes.Text) Then

MsgBox "请输入课程描述信息!", vbOKOnly + vbExclamation, "警告"

txtCoursedes.SetFocus

Exit Sub

End If

 

mrc.Delete

txtSQL = "select * from course_Info where course_No = '" & Trim(txtCourseno.Text) & "'"

Set mrcc = ExecuteSQL(txtSQL, MsgText)

If mrcc.EOF = False Then

MsgBox "课程编号重复,请重新输入!", vbOKOnly + vbExclamation, "警告"

mrcc.Close

txtCourseno.SetFocus

Else

mrcc.Close

mrc.AddNew

mrc.Fields(0) = Trim(txtCourseno.Text)

mrc.Fields(1) = Trim(txtCoursename.Text)

mrc.Fields(2) = Trim(comboCoursetype.Text)

mrc.Fields(3) = Trim(txtCoursedes.Text)

mrc.Update

MsgBox "修改课程信息成功!", vbOKOnly + vbExclamation, "警告"

mrc.Bookmark = myBookmark

Call viewData

Frame2.Enabled = True

firstCommand.Enabled = True

previousCommand.Enabled = True

nextCommand.Enabled = True

lastCommand.Enabled = True

 

txtCourseno.Enabled = False

txtCoursename.Enabled = False

comboCoursetype.Enabled = False

txtCoursedes.Enabled = False

 

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

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

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