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

 

Private Sub modifypwdMenu_Click()

frmModifyuserinfo.Show

End Sub

 

Private Sub modifyresultMenu_Click()

frmModifyresult.Show

End Sub

 

Private Sub modifysinfo_Menu_Click()

frmModifysinfo.Show

End Sub

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

 

............................... frmAdduser 添加用户窗口代码 .....................................

 

Private Sub cmdCancel_Click()

Unload Me

End Sub

 

Private Sub cmdOK_Click()

Dim txtSQL As String

Dim mrc As ADODB.Recordset

Dim MsgText As String

 

 

If Trim(Text1(0).Text) = "" Then

MsgBox "请输入用户名称!", vbOKOnly + vbExclamation, "警告"

Exit Sub

Text1(0).SetFocus

Else

txtSQL = "select * from user_Info "

Set mrc = ExecuteSQL(txtSQL, MsgText)

While (mrc.EOF = False)

If Trim(mrc.Fields(0)) = Trim(Text1(0)) Then

MsgBox "用户已经存在,请重新输入用户名!", vbOKOnly + vbExclamation, "警告"

Text1(0).SetFocus

Text1(0).Text = ""

Text1(1).Text = ""

Text1(2).Text = ""

Exit Sub

Else

mrc.MoveNext

End If

Wend

End If

 

If Trim(Text1(1).Text) <> Trim(Text1(2).Text) Then

MsgBox "两次输入密码不一样,请确认!", vbOKOnly + vbExclamation, "警告"

Text1(1).SetFocus

Text1(1).Text = ""

Text1(2).Text = ""

Exit Sub

 

Else

If Text1(1).Text = "" Then

MsgBox "密码不能为空!", vbOKOnly + vbExclamation, "警告"

Text1(1).SetFocus

Text1(1).Text = ""

Text1(2).Text = ""

Else

mrc.AddNew

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

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

mrc.Update

mrc.Close

Me.Hide

MsgBox "添加用户成功!", vbOKOnly + vbExclamation, "添加用户"

End If

End If

End Sub

 

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

 

............................... frmAddsinfo 添加学籍信息窗口代码 .................................

Private Sub Command1_Click()

Dim mrc As ADODB.Recordset

Dim txtSQL As String

Dim MsgText As String

 

If Not Testtxt(txtSID.Text) Then

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

txtSID.SetFocus

Exit Sub

End If

 

If Not Testtxt(txtName.Text) Then

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

txtName.SetFocus

Exit Sub

End If

 

If Not Testtxt(comboSex.Text) Then

MsgBox "请选择性别?quot;, vbOKOnly + vbExclamation, "警告"

comboSex.SetFocus

Exit Sub

End If

 

If Not Testtxt(txtBorndate.Text) Then

MsgBox "请输入出生日期!", vbOKOnly + vbExclamation, "警告"

txtBorndate.SetFocus

Exit Sub

End If

 

If Not Testtxt(comboClassNo.Text) Then

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

comboClassNo.SetFocus

Exit Sub

End If

 

If Not Testtxt(txtTel.Text) Then

MsgBox "请输入联系电话!", vbOKOnly + vbExclamation, "警告"

txtTel.SetFocus

Exit Sub

End If

 

If Not Testtxt(txtRudate.Text) Then

MsgBox "请输入入校日期!", vbOKOnly + vbExclamation, "警告"

txtRudate.SetFocus

Exit Sub

End If

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

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