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

当前位置:教育资料网 -> 开题报告 -> 计算机开题

药品库房管理系统+VB开题报告答辩PPT外文翻译(四)

药品库房管理系统+VB开题报告答辩PPT外文翻译(四) ring
Public username As String
Public userright As String
Public conn As String

Private Sub Command1_Click()
Dim password As String
Dim respond As String
username = Text1.Text
password = Text2.Text
On Error GoTo err1
Adodc1.ConnectionString = conn
Adodc1.RecordSource = "select * from usertab where 用户名=" & "'" & username & "'" & " and " & "密码=" & "'" & password & "'"
Adodc1.Refresh
If Adodc1.Recordset.AbsolutePosition = adPosUnknown Then
respond = MsgBox("用户名或密码错误,请重新输入!", vbOKOnly, "警告")
If respond <> vbOKOnly Then
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
username = ""
password = ""
End If
Else
userright = Adodc1.Recordset.Fields("权限")
Unload frmlogin
frmmain.Show
End If
Exit Sub
err1:
MsgBox "系统配置错误!无法与服务器连接!"
userright = "0"
Unload Me
frmsysset.Show
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
'conn = Frmstart.pconn
conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\his.mdb;Persist Security Info=False"
End Sub

 

 

 

用户修改密码界面设计:

代码设计:
Private Sub Command1_Click()
On Error GoTo err1
username = frmlogin.username
If Text1.Text <> "" And Text2.Text <> "" Then
Adodc1.RecordSource = "select * from usertab where 用户名='" & username & "' and  密码=" & "'" & Text1.Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.AbsolutePosition = adPosUnknown Then
MsgBox "旧密码错误!"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
Else
Adodc1.Recordset.Fields("密码") = Text2.Text
Adodc1.Recordset.Update
MsgBox "密码修改成功!"
Text1.Text = ""
Text2.Text = ""
End If
Else
MsgBox "新旧密码均不得为空!"
Text1.SetFocus
End If
Exit Sub
err1:
MsgBox "远程服务器连接失败!"
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End Sub

Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Load()
On Error GoTo err2
chpwd.Top = (frmmain.Height - chpwd.Height) / 2 - 500
chpwd.Left = (frmmain.Width - chpwd.Width) / 2
Adodc1.ConnectionString = frmlogin.conn
Text1.Text = ""
Text2.Text = ""
Exit Sub
err2:
MsgBox "远程服务器连接失败!"
End Sub
Private Sub Form_Unload(Cancel As Integer)
frmmain.StatusBar1.Panels(2) = "目前没有窗口被激活"
End Sub
Private Sub Form_Activate()
frmmain.StatusBar1.Panels(2) = "活动窗口:" & chpwd.Caption
End Sub

 

 

3,关于界面设计:


代码设计:
Private Sub cmdOK_Click()
  Unload Me
End Sub

Private Sub Form_Load()
frmAbout.Top = (frmmain.Height - frmAbout.Height) / 2 - 500
frmAbout.Left = (frmmain.Width - frmAbout.Width) / 2
    Me.Caption = "关于" & App.Title
  
    lblTitle.Caption = App.Title
    End Sub

Public Sub StartSysInfo()
    On Error GoTo SysInfoErr
 
    Dim rc As Long
    Dim SysInfoPath As String
   
    ' 试图从注册表中获得系统信息程序的路径及名称...
    If GetKeyValue(HKEY_LOCAL_MACHINE, gREGKEYSYSINFO, gREGVALSYSINFO, SysInfoPath) Then
    ' 试图仅从注册表中获得系统信息程序的路径...
    ElseIf GetKeyValue(HKEY_LOCAL_MACHINE, gREGKEYSYSINFOLOC, gREGVALSYSINFOLOC, SysInfoPath) Then
 &nb

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

药品库房管理系统+VB开题报告答辩PPT外文翻译(四)由教育资料网(www.jaoyuw.com)会员上传。
原创资料流程 相关资料
上一篇:学生信息管理系统+VB代码+开题报.. 下一篇:基于多媒体技术的旅游信息演示与..
推荐资料 本专业最新资料
Tags:药品 库房 管理系统 开题 报告 答辩 PPT 外文 翻译 2010-04-22 08:50:42【返回顶部】
精彩推荐
发表资料

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


教育资料网提供资料范文,资料代发,原创资料

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

Copyright@ 2009-2020 教育资料网 版权所有 湘ICP备19027999