📄 frmjsdy.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{0B81E4A9-BE4E-4AEF-9272-33AB5B51C6FC}#1.0#0"; "XPControls.ocx"
Begin VB.Form FrmJSDY
BackColor = &H00D3DABC&
BorderStyle = 1 'Fixed Single
Caption = "角色定义"
ClientHeight = 7185
ClientLeft = 45
ClientTop = 330
ClientWidth = 9690
Icon = "FrmJSDY.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 7185
ScaleWidth = 9690
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame4
BackColor = &H00D3DABC&
Caption = "操作"
Height = 915
Left = 3390
TabIndex = 9
Top = 6120
Width = 6165
Begin XPControls.XPCommandButton cmdAdd
Height = 405
Left = 210
TabIndex = 10
Top = 300
Width = 1005
_ExtentX = 1773
_ExtentY = 714
Caption = "添加"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin XPControls.XPCommandButton cmdModify
Height = 405
Left = 2610
TabIndex = 11
Top = 300
Width = 1005
_ExtentX = 1773
_ExtentY = 714
Caption = "修改"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin XPControls.XPCommandButton cmdDelete
Height = 405
Left = 3750
TabIndex = 12
Top = 300
Width = 1005
_ExtentX = 1773
_ExtentY = 714
Caption = "删除"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin XPControls.XPCommandButton cmdSave
Height = 405
Left = 1410
TabIndex = 13
Top = 300
Width = 1005
_ExtentX = 1773
_ExtentY = 714
Caption = "保存"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin XPControls.XPCommandButton cmdExit
Height = 405
Left = 4920
TabIndex = 14
Top = 300
Width = 1005
_ExtentX = 1773
_ExtentY = 714
Caption = "退出"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
End
Begin VB.Frame Frame3
BackColor = &H00D3DABC&
Caption = "权限"
Height = 5895
Left = 3390
TabIndex = 7
Top = 150
Width = 6165
Begin MSComctlLib.TreeView TvwMNU
Height = 5535
Left = 120
TabIndex = 8
Top = 240
Width = 5925
_ExtentX = 10451
_ExtentY = 9763
_Version = 393217
LabelEdit = 1
Style = 7
Checkboxes = -1 'True
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
End
Begin VB.Frame Frame2
BackColor = &H00D3DABC&
Caption = "基本信息"
Height = 1755
Left = 90
TabIndex = 2
Top = 5280
Width = 3195
Begin VB.TextBox TxtJSSM
BackColor = &H00FFFFC0&
Height = 975
Left = 690
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 6
Top = 630
Width = 2325
End
Begin VB.TextBox TxtJSMC
BackColor = &H00FFFFC0&
Height = 315
Left = 690
TabIndex = 4
Top = 240
Width = 2325
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "说明:"
Height = 255
Left = 90
TabIndex = 5
Top = 660
Width = 615
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "名称:"
Height = 255
Left = 60
TabIndex = 3
Top = 270
Width = 645
End
End
Begin VB.Frame Frame1
BackColor = &H00D3DABC&
Caption = "现有角色"
Height = 5055
Left = 120
TabIndex = 0
Top = 150
Width = 3165
Begin MSComctlLib.ListView LvwJS
Height = 4755
Left = 90
TabIndex = 1
Top = 210
Width = 2985
_ExtentX = 5265
_ExtentY = 8387
View = 3
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = 0 'False
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
ForeColor = -2147483640
BackColor = 16777152
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 2
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "角色说明"
Object.Width = 0
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "角色名称"
Object.Width = 4410
EndProperty
End
End
End
Attribute VB_Name = "FrmJSDY"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mStatus As String '记录当前所处状态
Private Sub cmdAdd_Click()
Dim i As Integer
EnableJSInput True
mStatus = "Add"
TxtJSMC.Text = ""
TxtJSMC.Enabled = True
TxtJSSM.Text = ""
cmdSave.Enabled = True
cmdModify.Enabled = False
cmdDelete.Enabled = False
cmdAdd.Enabled = False
For i = 1 To TvwMNU.Nodes.Count
TvwMNU.Nodes(i).Checked = False
Next i
End Sub
Private Sub cmdDelete_Click()
Dim cmdTemp As ADODB.Command
Dim strSQL As String
If LongToString(Mid(LvwJS.SelectedItem.Key, 2), 2) = GManager.SystemKSYS _
Or LongToString(Mid(LvwJS.SelectedItem.Key, 2), 2) = GManager.SystemXTGL _
Or LongToString(Mid(LvwJS.SelectedItem.Key, 2), 2) = GManager.SystemLRY Then
MsgBox "该角色为系统预定义角色,不可删除", vbInformation, "提示"
Exit Sub
End If
Select Case LvwJS.SelectedItem.SubItems(1)
Case "科室医生", "系统管理员", "录入员", "终检医生", "超级医生"
MsgBox "该角色为系统预定义角色,不可删除", vbInformation, "提示"
Exit Sub
Case Else
'
End Select
If MsgBox("您确实要删除该角色吗?" & vbCrLf & "删除该角色也将删除属于该角色的所有人员!", vbQuestion + vbOKCancel + vbDefaultButton2, "警告") = vbOK Then
Set cmdTemp = New ADODB.Command
Set cmdTemp.ActiveConnection = GCon
strSQL = "delete from SET_JS_Index where JSID=" & CInt(Mid(LvwJS.SelectedItem.Key, 2))
cmdTemp.CommandText = strSQL
cmdTemp.Execute
strSQL = "delete from SET_JS_MNUData where JSID=" & CInt(Mid(LvwJS.SelectedItem.Key, 2))
cmdTemp.CommandText = strSQL
cmdTemp.Execute
strSQL = "delete from RY_Employee where JSID=" & CInt(Mid(LvwJS.SelectedItem.Key, 2))
cmdTemp.CommandText = strSQL
cmdTemp.Execute
RefreshJS
MsgBox "删除完毕", vbInformation, "提示"
End If
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdModify_Click()
EnableJSInput True
TxtJSMC.Locked = False
Select Case LvwJS.SelectedItem.SubItems(1)
Case "科室医生", "系统管理员", "录入员", "超级医生"
TxtJSMC.Enabled = False
Case Else
TxtJSMC.Enabled = True
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -