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

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

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

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

 

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

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

Exit Sub

txtCourseno.SetFocus

End If

 

txtSQL = "select * from course_Info "

Set mrc = ExecuteSQL(txtSQL, MsgText)

 

While (mrc.EOF = False)

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

MsgBox "课程编号已经存在,请重新输入课程编号!", vbOKOnly + vbExclamation, "警告"

txtCourseno.Text = ""

txtCourseno.SetFocus

Exit Sub

Else

mrc.MoveNext

End If

Wend

 

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

mrc.Close

MsgBox "添加课程信息成功!", vbOKOnly + vbExclamation, "添加课程信息"

Unload Me

End Sub

 

Private Sub Command2_Click()

Unload Me

End Sub

 

Private Sub Form_Load()

comboCoursetype.AddItem "必修"

comboCoursetype.AddItem "考查"

 

End Sub

 

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

 

 

.............................. frmAddresult 添加成绩信息窗口代码 .................................

 

Dim Flagselect As Boolean

Dim Grade As String

 

Private Sub cmdCancel_Click()

Unload Me

End Sub

 

Private Sub cmdOK_Click()

Dim mrc As ADODB.Recordset

Dim txtSQL As String

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

 

txtSQL = "select * from result_Info where exam_No = '" & comboExamtype.Text & "' and student_ID = '" & comboSID.Text & "' and course_Name = '" & comboCourse.Text & "'"

Set mrc = ExecuteSQL(txtSQL, MsgText)

If mrc.EOF = False Then

MsgBox "有相同纪录,请重新输入信息!", vbOKOnly + vbExclamation, "警告"

mrc.Close

Else

mrc.AddNew

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

MsgBox "添加成绩成功!", vbOKOnly + vbExclamation, "警告"

Unload Me

End If

 

End Sub

 

Private Sub comboClassno_Click()

Dim mrc As ADODB.Recordset

Dim txtSQL As String

Dim MsgText As String

 

 

comboSID.Clear

comboCourse.Clear

txtSQL = "select * from student_Info where class_NO = '" & comboClassno.Text & "'"

Set mrc = ExecuteSQL(txtSQL, MsgText)

While (mrc.EOF = False)

comboSID.AddItem mrc!student_ID

mrc.MoveNext

Wend

 << 上一页  [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]  ... 下一页  >> 

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

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