📄 frmproperty.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Begin VB.Form frmProperty
BorderStyle = 3 'Fixed Dialog
ClientHeight = 5400
ClientLeft = 45
ClientTop = 330
ClientWidth = 4950
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "frmProperty.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5400
ScaleWidth = 4950
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin TabDlg.SSTab stbProperty
Height = 4815
Left = 60
TabIndex = 2
Top = 60
Width = 4815
_ExtentX = 8493
_ExtentY = 8493
_Version = 393216
Style = 1
Tabs = 1
TabsPerRow = 1
TabHeight = 520
TabCaption(0) = " 属性"
TabPicture(0) = "frmProperty.frx":000C
Tab(0).ControlEnabled= -1 'True
Tab(0).Control(0)= "fraBottom"
Tab(0).Control(0).Enabled= 0 'False
Tab(0).ControlCount= 1
Begin VB.Frame fraBottom
BorderStyle = 0 'None
Height = 4335
Left = 120
TabIndex = 3
Top = 360
Width = 4575
Begin MSComctlLib.ListView lvwProperty
Height = 1935
Left = 0
TabIndex = 4
Top = 2400
Width = 4575
_ExtentX = 8070
_ExtentY = 3413
View = 3
Arrange = 2
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = -1 'True
AllowReorder = -1 'True
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
NumItems = 3
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "员工编号"
Object.Width = 2117
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "姓名"
Object.Width = 2117
EndProperty
BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 2
Text = "职务"
Object.Width = 2822
EndProperty
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "部门名称:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 720
TabIndex = 13
Top = 240
Width = 765
End
Begin VB.Label lblTxt
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "部门职责:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Index = 0
Left = 120
TabIndex = 12
Top = 720
Width = 765
End
Begin VB.Label lblTxt
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "上层部门:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Index = 1
Left = 120
TabIndex = 11
Top = 1320
Width = 765
End
Begin VB.Image imgPic
Height = 315
Left = 240
Stretch = -1 'True
Top = 240
Width = 315
End
Begin VB.Label lblProperty
AutoSize = -1 'True
BackStyle = 0 'Transparent
ForeColor = &H00C00000&
Height = 180
Index = 0
Left = 1920
TabIndex = 10
Top = 240
Width = 90
End
Begin VB.Line Line7
BorderColor = &H00808080&
X1 = 0
X2 = 4560
Y1 = 585
Y2 = 585
End
Begin VB.Line Line4
BorderColor = &H00FFFFFF&
X1 = 0
X2 = 4560
Y1 = 600
Y2 = 600
End
Begin VB.Label lblProperty
BackStyle = 0 'Transparent
ForeColor = &H00C00000&
Height = 495
Index = 1
Left = 1080
TabIndex = 9
Top = 720
Width = 3255
End
Begin VB.Label lblProperty
BackStyle = 0 'Transparent
ForeColor = &H00C00000&
Height = 255
Index = 2
Left = 1080
TabIndex = 8
Top = 1320
Width = 3255
End
Begin VB.Label lblTxt
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "员工信息:"
Height = 180
Index = 3
Left = 120
TabIndex = 7
Top = 2160
Width = 810
End
Begin VB.Label lblTxt
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "人员数量:"
Height = 180
Index = 2
Left = 120
TabIndex = 6
Top = 1680
Width = 810
End
Begin VB.Line Line1
BorderColor = &H00808080&
X1 = 0
X2 = 4560
Y1 = 2025
Y2 = 2025
End
Begin VB.Line Line2
BorderColor = &H00FFFFFF&
X1 = 0
X2 = 4560
Y1 = 2040
Y2 = 2040
End
Begin VB.Label lblProperty
BackStyle = 0 'Transparent
ForeColor = &H00C00000&
Height = 255
Index = 3
Left = 1080
TabIndex = 5
Top = 1680
Width = 3255
End
End
End
Begin VB.CommandButton cmdEdit
Caption = "编辑..."
Height = 350
Left = 2580
TabIndex = 1
Top = 4980
Width = 1095
End
Begin VB.CommandButton cmdExit
Cancel = -1 'True
Caption = "关闭(&C)"
Default = -1 'True
Height = 350
Left = 3780
TabIndex = 0
Top = 4980
Width = 1095
End
End
Attribute VB_Name = "frmProperty"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim strName As String
Private Sub cmdEdit_Click()
On Error GoTo errNext
frmInfo.mnuPopMenuA_Click (0)
Exit Sub
errNext:
MsgBox "错误:" & Err.Number & vbCrLf & Err.Description, vbOKOnly + vbExclamation, "运行错误"
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub Form_Load()
frmInfo.Enabled = False
lvwProperty.SmallIcons = frmInfo.iltPic
stbProperty.TabPicture(0) = frmInfo.iltPic.ListImages(1).Picture
Dim intManageCount As Integer
Dim intCount As Integer
Dim adoTempLink As New ADODB.Recordset
On Error Resume Next
For intCount = 3 To Len(nodName.Text)
If Right(nodName.Text, intCount) Like "(*)" Then
strName = Mid(nodName.Text, 1, Len(nodName.Text) - intCount)
frmProperty.lblProperty(0).Caption = strName
frmProperty.lblProperty(3).Caption = Mid(nodName.Text, Len(nodName.Text) - intCount + 2, intCount - 2)
Me.Caption = "属性-" & strName
Exit For
End If
Next
Me.Show
With adoTempLink
.Open "select 隶属部门,上层部门,部门职责,层次 from 隶属部门 where 隶属部门='" & strName & "'", adoConn, adOpenDynamic, adLockPessimistic, adCmdText
If .EOF = False Then
frmProperty.lblProperty(1).Caption = IIf(Len(Trim(.Fields("部门职责"))) > 0, .Fields("部门职责") & "", "无介绍")
frmProperty.lblProperty(2).Caption = IIf(Len(Trim(.Fields("上层部门"))) > 0, .Fields("上层部门") & "", "无上层")
imgPic.Picture = frmInfo.iltPic.ListImages(.Fields("层次") + 1).Picture
End If
.Close
.Open "select 员工编号,隶属部门,姓名,职务 from v员工详细资料 where 隶属部门='" & strName & "'", adoConn, adOpenDynamic, adLockPessimistic, adCmdText
intCount = 0
Do Until .EOF
intCount = intCount + 1
lvwProperty.ListItems.Add intCount, , Trim(.Fields("员工编号")), , 6
lvwProperty.ListItems(intCount).ListSubItems.Add , , .Fields("姓名") & ""
lvwProperty.ListItems(intCount).ListSubItems.Add , , .Fields("职务") & ""
.MoveNext
Loop
End With
Set adoTempLink = Nothing
End Sub
Private Sub Form_Unload(Cancel As Integer)
frmInfo.Enabled = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -