📄 ihms_globalvars.bas
字号:
Attribute VB_Name = "modGlobalVars"
'****************************************************************************
' :) 人人为我,我为人人 :)
'枕善居汉化收藏整理
'发布日期:06/02/21
'描 述:智能医院管理系统 Version 1.0
'网 站:http://www.mndsoft.com/
'e-mail :mnd@mndsoft.com
'OICQ :88382850
'****************************************************************************
Option Explicit
Public LoginSucceeded As Boolean 'Used to validate log-in procedure.
Public patientNumberX As Integer 'Stores hosp_no to be sought for in the db.
Public somePatient As CPatient 'Made public so it can be accessed by frmOldPatient.
Public Sub ConfigMenus(Optional userName As String)
With frmMain
If LoginSucceeded = True Then
'menu items
.mnuLogIn.Enabled = False
.mnuSep1.Visible = True
.mnuNewPatient.Visible = True
.mnuOpen.Visible = True
.mnuClose.Visible = True
.mnuSep2.Visible = True
.mnuLogOut.Enabled = True
If UCase(userName) = "医生" Then .mnuTools.Enabled = True
.StatusBar1.SimpleText = "用户已登录"
'toolbar buttons
.tbrMainToolbar.Buttons(1).Caption = "用户注销" 'login/logout button
.tbrMainToolbar.Buttons(1).ToolTipText = "用户注销" 'login button
.tbrMainToolbar.Buttons(3).Enabled = True 'new registration button
.tbrMainToolbar.Buttons(4).Enabled = True 'open existing patient file
.tbrMainToolbar.Buttons(5).Enabled = False 'admit/discharge button
.tbrMainToolbar.Buttons(6).Enabled = False 'diagnose button
Else
'Close all open windows (all child forms)
Unload frmNewReg
Unload frmOldPatient
'menu items
.mnuLogIn.Enabled = True
.mnuSep1.Visible = False
.mnuNewPatient.Visible = False
.mnuOpen.Visible = False
.mnuClose.Visible = False
.mnuSep2.Visible = False
.mnuLogOut.Enabled = False
.mnuTools.Enabled = False
.StatusBar1.SimpleText = "尚无用户登录!"
'toolbar buttons
.tbrMainToolbar.Buttons(1).Caption = "用户登录" 'loginout button
.tbrMainToolbar.Buttons(1).ToolTipText = "登录系统" 'login button
.tbrMainToolbar.Buttons(3).Enabled = False 'new registration button
.tbrMainToolbar.Buttons(4).Enabled = False 'open existing patient file
.tbrMainToolbar.Buttons(5).Enabled = False 'admit/discharge button
.tbrMainToolbar.Buttons(6).Enabled = False 'diagnose button
End If
End With
End Sub
Public Sub ClearRegForm()
With frmNewReg
'.txtHospNo.Text = ""
.txtSName.Text = ""
.txtFName.Text = ""
.txtDoB.Text = ""
.txtHomeAdd.Text = ""
.txtStateOfOrigin.Text = ""
.txtOccupation.Text = ""
.txtNameOfSponsor.Text = ""
.txtAddOfSponsor.Text = ""
.txtKinName.Text = ""
.txtRelationship.Text = ""
.txtKinAddress.Text = ""
.txtAllergy.Text = ""
'code snippet1 goes here if need be
End With
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -