网站地图| 免费获取|
免费论文网
  • 网站首页|
  • 论文范文|
  • 修改降重|
  • 职称论文|
  • 合作期刊|
  • 论文下载|
  • 计算机论文|
  • 外文翻译|
  • 免费论文|
  • 原创论文|
  • 开题报告论文
搜索

当前位置:免费论文网 -> 免费论文 -> 计算机论文 -> VB高速公路票据管理系统(四)
计算机论文| ASP设计| Delphi| VB设计| JSP设计| ASP.NET设计| VB.NET| java设计| VC| pb| VS| dreamweaver| c#.net| vf| VC++| 计算机论文范文| 论文下载| 自动化论文

VB高速公路票据管理系统(四)

VB高速公路票据管理系统(四)
Exit Sub
End If

If Len(Trim(txtPassword.Text)) = 0 Then
MsgBox "用户密码为空,请重新输入!!", vbOKOnly
Exit Sub
End If
 
With conlogin
If .State = adStateOpen Then
   .Close
End If
  .Provider = "microsoft.jet.oledb.4.0"
  .ConnectionString = App.Path & "\jinbin.mdb"
  .Open
End With

With rstlogin
If .State = adStateOpen Then
   .Close
End If
   .LockType = adLockReadOnly
   .CursorLocation = adUseClient
   .CursorType = adOpenDynamic
   .ActiveConnection = conlogin
   .Source = "select * from userinfo"
   .Open
 
If Trim(txtPassword.Text) = flagpassword And Len(Trim(txtPassword.Text)) = Len(flagpassword) Then
If flagadmin = "高级用户" Then
wt.flagnumber = 79802223
Unload Me
mainfrm.Show
ElseIf flagadmin = "一般用户" Then
wt.flagnumber = 32220897
Unload Me
mainfrm.Show
Else
MsgBox "非法人员及权限,请找管理员", vbOKOnly
Exit Sub
End If
Else
MsgBox "密码错误,请重新输入"
Exit Sub
End If
End With
End Sub

Private Sub txtgonghao_LostFocus()
Dim conlogin As New ADODB.Connection
Dim rstlogin As New ADODB.Recordset

If Len(Trim(txtgonghao.Text)) <> 0 Then
With conlogin
If .State = adStateOpen Then
   .Close
End If
   .Provider = "microsoft.jet.oledb.4.0"
   .ConnectionString = App.Path & "\jinbin.mdb"
   .Open
End With

With rstlogin
If .State = adStateOpen Then
   .Close
End If
   .LockType = adLockReadOnly
   .CursorLocation = adUseClient
   .CursorType = adOpenDynamic
   .ActiveConnection = conlogin
   .Source = "select userid,username,userpassword,userjibie from userinfo where userid='" & Trim(txtgonghao.Text) & "'"
   .Open
If .RecordCount <> 0 Then
Do Until .EOF
txtusername.Text = Trim(.Fields!UserName.Value)
flagpassword = Trim(.Fields!userpassword.Value)
flagadmin = Trim(.Fields!userjibie.Value)
.MoveNext
Loop
Else
MsgBox "输入的工号非法,请重新输入", vbOKOnly
txtgonghao.Text = ""
txtgonghao.SetFocus
Exit Sub
End If
End With
End If
End Sub

 

 


2:添加用户界面设计:

代码设计:
Private Sub cmdadd_Click()
Dim conuser As New ADODB.Connection
Dim cmduser As New ADODB.Command
Dim rstuser As New ADODB.Recordset
Dim strcnn As String

'输入数据进行验证
If Len(Trim(txtuser.Text)) = 0 Then
MsgBox "用户名没有输入,请输入!", vbOKOnly
Exit Sub
Else
txtuser.Text = CStr(Trim(txtuser.Text))
End If

If Len(Trim(txtgonghao.Text)) = 0 Then
MsgBox "工号没有输入,请输入!", vbOKOnly
Exit Sub
Else
txtgonghao.Text = CStr(Trim(txtgonghao.Text))
End If
 
If Len(Trim(txtpassword.Text)) = 0 Then
MsgBox "密码没有输入,请输入!", vbOKOnly
Exit Sub
Else
txtpassword.Text = CStr(Trim(txtpassword.Text))
End If

If Len(Trim(txtpassword2.Text)) = 0 Then
MsgBox "请输入确认密码!", vbOKOnly
Exit Sub
Else
txtpassword2.Text = CStr(Trim(txtpassword2.Text))
End If

If txtpassword.Text <> txtpassword2.Text Then
MsgBox "确认密码和第一次输入的密码不同,请重新输入!", vbOKOnly
Exit Sub
End If

strcnn = "insert into userinfo(username,userid,userpassword,userjibie)values('" & txtuser & "','" & txtgonghao & "','" & txtpassword & "','" & Comboqx.Text & "')"
 
With conuse

首页 上一页 1 2 3 4 5 6 7 下一页 尾页 4/10/10

VB高速公路票据管理系统(四)由免费论文网(www.jaoyuw.com)会员上传。
原创论文流程 相关论文
上一篇:电表管理系统VB 下一篇:VB工资管理系统
推荐论文 本专业最新论文
Tags:高速公路 票据 管理系统 2010-04-23 19:49:29【返回顶部】
精彩推荐
发表论文

联系方式 | 论文说明 | 网站地图 | 免费获取 | 钻石会员 | 硕士论文


免费论文网提供论文范文,论文代发,原创论文

本站部分文章来自网友投稿上传,如发现侵犯了您的版权,请联系指出,本站及时确认并删除  E-mail: 17304545@qq.com

Copyright@ 2009-2020 免费论文网 版权所有 湘ICP备19027999