教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 精品文档 > 学前教育 >

计算机VB+SQL学生成绩管理系统(10)

来源:网络收集 时间:2026-07-30
导读: End If End If If Me.RadioButton3.Checked Then Dim str As String = \超级用户\ Me.TextBox1.Text.Trim \(用户名,密码) values ('\ \ \ link(str) MessageBox.Show(\超级用户\ \已成功\, \添加成功\, MessageBoxB

End If End If

If Me.RadioButton3.Checked Then

Dim str As String = \超级用户\ & \用户名='\ & Me.TextBox1.Text.Trim & \

If link(str).Rows.Count = 0 Then str = Nothing

str = \into 超级用户\ & \(用户名,密码) values ('\ & Me.TextBox1.Text.Trim & \ & Me.TextBox2.Text.Trim & \ link(str)

MessageBox.Show(\超级用户\ & Me.TextBox1.Text & \已成功\, \添加成功\, MessageBoxButtons.OK, MessageBoxIcon.Information) Else

MessageBox.Show(\记录\ & Me.TextBox1.Text & \已存在\, \添加失败\, MessageBoxButtons.OK, MessageBoxIcon.Error) End If End If

End Sub

用户修改代码:

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

If Me.TextBox3.Text.Trim = String.Empty Then

MessageBox.Show(\密码不能为空\, \添加失败\, MessageBoxButtons.OK, MessageBoxIcon.Error) Else

If Me.RadioButton1.Checked Then

str = \普通用户 set 密码='\ & Me.TextBox3.Text.Trim & \用户名='\ & Me.ComboBox1.Text.Trim & \

If Not link(str).Rows.Count Then

MessageBox.Show(\修改普通用户密码成功!\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Question) End If End If

If Me.RadioButton2.Checked Then

str = \高级用户 set 密码='\ & Me.TextBox3.Text.Trim & \用户名='\ & Me.ComboBox1.Text.Trim & \

If Not link(str).Rows.Count Then

MessageBox.Show(\修改高级用户密码成功!\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Question) End If End If

If Me.RadioButton3.Checked Then

str = \超级用户 set 密码='\ & Me.TextBox3.Text.Trim & \用户名='\

& Me.ComboBox1.Text.Trim & \

If Not link(str).Rows.Count Then

MessageBox.Show(\修改超级用户密码成功!\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Question) End If End If End If

End Sub

用户删除代码:

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click

If Me.RadioButton1.Checked Then

Dim str As String = \普通用户 where 用户名='\ & ComboBox2.Text.Trim & \

link(str)

MessageBox.Show(\删除普通用户记录\ & ComboBox2.Text & \, \删除成功\, MessageBoxButtons.OK, MessageBoxIcon.Information) End If

If Me.RadioButton2.Checked Then

Dim str As String = \高级用户 where 用户名='\ & ComboBox2.Text.Trim & \

link(str)

MessageBox.Show(\删除高级用户记录\ & ComboBox2.Text & \, \删除成功\, MessageBoxButtons.OK, MessageBoxIcon.Information) End If

If Me.RadioButton3.Checked Then

Dim str As String = \超级用户 where 用户名='\ & ComboBox2.Text.Trim & \

link(str)

MessageBox.Show(\删除超级用户记录\ & ComboBox2.Text & \, \删除成功\, MessageBoxButtons.OK, MessageBoxIcon.Information) End If

End Sub

用户查询代码:

Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click

If Me.RadioButton1.Checked Then

xh = \普通用户 where 用户名='\ & Me.TextBox6.Text.Trim & \ ElseIf Me.RadioButton2.Checked Then

xh = \高级用户 where 用户名='\ & Me.TextBox6.Text.Trim & \ ElseIf Me.RadioButton3.Checked Then

xh = \超级用户 where 用户名='\ & Me.TextBox6.Text.Trim & \

End If chaxun()

End Sub

5.5用户注册

图4.5用户注册

设计过程:

进入用户注册界面后输入所要注册用户名和密码,再次确定后,选择所要注册的用户类型,点击提交后即可把相应的用户名和密码存入相应的用户信息表。

设计代码:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

If Me.TextBox1.Text.Trim = String.Empty Then

MessageBox.Show(\用户名不能为空\, \添加失败\, MessageBoxButtons.OK, MessageBoxIcon.Error)

ElseIf Me.TextBox2.Text.Trim = String.Empty Then

MessageBox.Show(\密码不能为空\, \添加失败\, MessageBoxButtons.OK, MessageBoxIcon.Error) End If

If Me.RadioButton1.Checked Then

Dim str As String = \普通用户\ & \用户名='\ & Me.TextBox1.Text.Trim & \

If link(str).Rows.Count = 0 Then

If Me.TextBox3.Text = Me.TextBox2.Text Then

str = Nothing

str = \普通用户\ & \用户名,密码) values ('\ & Me.TextBox1.Text.Trim & \ & Me.TextBox2.Text.Trim & \ link(str)

MessageBox.Show(\普通用户\ & Me.TextBox1.Text & \已成功\, \添加成功\, MessageBoxButtons.OK, MessageBoxIcon.Information) Else

MessageBox.Show(\两次密码不一致\, \添加失败\, MessageBoxButtons.OK, MessageBoxIcon.Error) End If Else

MessageBox.Show(\记录\ & Me.TextBox1.Text & \已存在\, \添加失败\, MessageBoxButtons.OK, MessageBoxIcon.Error) End If End If

If Me.RadioButton2.Checked Then

Dim str As String = \高级用户\ & \用户名='\ & Me.TextBox1.Text.Trim & \

If link(str).Rows.Count = 0 Then

If Me.TextBox3.Text = Me.TextBox2.Text Then str = Nothing

…… 此处隐藏:1574字,全部文档内容请下载后查看。喜欢就下载吧 ……

计算机VB+SQL学生成绩管理系统(10).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wendang/592630.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)