📄 frmemployees.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.OCX"
Begin VB.Form frmEmployees
BorderStyle = 1 'Fixed Single
Caption = "员工管理"
ClientHeight = 6495
ClientLeft = 45
ClientTop = 330
ClientWidth = 9435
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6495
ScaleWidth = 9435
StartUpPosition = 1 '所有者中心
Begin MSComctlLib.StatusBar staEmployees
Align = 2 'Align Bottom
Height = 375
Left = 0
TabIndex = 7
Top = 6120
Width = 9435
_ExtentX = 16642
_ExtentY = 661
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 3
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 2
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 1764
MinWidth = 1764
Text = "总记录:"
TextSave = "总记录:"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 12224
Key = "recordcount"
EndProperty
EndProperty
End
Begin MSComctlLib.ImageList ilsTRee
Left = 840
Top = 2520
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 3
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmEmployees.frx":0000
Key = "depart"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmEmployees.frx":0352
Key = "root"
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmEmployees.frx":06A4
Key = "select"
EndProperty
EndProperty
End
Begin VB.Frame framflex
Height = 5415
Left = 0
TabIndex = 1
Top = 600
Width = 9375
Begin VB.Timer tmrSta
Interval = 1000
Left = 2640
Top = 3720
End
Begin MSComctlLib.ImageList ilsTbl
Left = 2280
Top = 1920
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 9
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmEmployees.frx":09F6
Key = "add"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmEmployees.frx":0F90
Key = "delete"
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmEmployees.frx":152A
Key = "edit"
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmEmployees.frx":1AC4
Key = "exit"
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmEmployees.frx":1DDE
Key = "help"
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmEmployees.frx":26B8
Key = "Preview"
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmEmployees.frx":2C52
Key = "Print"
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmEmployees.frx":31EC
Key = "calcu"
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmEmployees.frx":3786
Key = "query"
EndProperty
EndProperty
End
Begin MSHierarchicalFlexGridLib.MSHFlexGrid flexEmployees
Height = 5175
Left = 1920
TabIndex = 2
Top = 120
Width = 7455
_ExtentX = 13150
_ExtentY = 9128
_Version = 393216
BackColorBkg = -2147483639
_NumberOfBands = 1
_Band(0).Cols = 2
End
Begin MSComctlLib.TreeView trwDepart
Height = 5175
Left = 0
TabIndex = 4
Top = 120
Width = 1815
_ExtentX = 3201
_ExtentY = 9128
_Version = 393217
Indentation = 353
LabelEdit = 1
Style = 7
ImageList = "ilsTRee"
Appearance = 1
End
End
Begin VB.Frame framTbl
Height = 735
Left = 0
TabIndex = 0
Top = 0
Width = 9375
Begin MSComctlLib.Toolbar tblEmployees
Height = 540
Left = 120
TabIndex = 3
Top = 120
Width = 1575
_ExtentX = 2778
_ExtentY = 953
ButtonWidth = 820
ButtonHeight = 953
Style = 1
ImageList = "ilsTbl"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 4
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "增加"
Key = "add"
Object.ToolTipText = "新增"
ImageKey = "add"
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "删除"
Key = "delete"
Object.ToolTipText = "删除"
ImageKey = "delete"
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "修改"
Key = "modify"
ImageKey = "edit"
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
EndProperty
End
Begin MSComctlLib.Toolbar tlbExit
Height = 540
Left = 3360
TabIndex = 5
Top = 120
Width = 975
_ExtentX = 1720
_ExtentY = 953
ButtonWidth = 820
ButtonHeight = 953
Style = 1
ImageList = "ilsTbl"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 2
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "返回"
Key = "exit"
ImageKey = "exit"
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "帮助"
Key = "help"
ImageKey = "help"
EndProperty
EndProperty
End
Begin MSComctlLib.Toolbar tlbPrint
Height = 540
Left = 1560
TabIndex = 6
Top = 120
Width = 1815
_ExtentX = 3201
_ExtentY = 953
ButtonWidth = 820
ButtonHeight = 953
AllowCustomize = 0 'False
Style = 1
ImageList = "ilsTbl"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 5
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "查询"
Key = "query"
ImageKey = "query"
Style = 5
BeginProperty ButtonMenus {66833FEC-8583-11D1-B16A-00C0F0283628}
NumButtonMenus = 2
BeginProperty ButtonMenu1 {66833FEE-8583-11D1-B16A-00C0F0283628}
Key = "singQuery"
Text = "单一条件查询"
EndProperty
BeginProperty ButtonMenu2 {66833FEE-8583-11D1-B16A-00C0F0283628}
Key = "multi"
Text = "多条件查询"
EndProperty
EndProperty
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "预览"
Key = "Preview"
ImageKey = "Preview"
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "打印"
Key = "print"
ImageKey = "Print"
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
EndProperty
End
End
End
Attribute VB_Name = "frmEmployees"
Attribute VB_GlobalNameSpace = False
'Download by http://www.codefans.net
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Function RecordSetFindItem(ByVal SourceRecordset As ADODB.Recordset, ByVal FieldName As String, ByVal varFinds As String, ByVal fieldindex As Integer) As Variant
If Not (SourceRecordset.BOF And SourceRecordset.EOF) Then
SourceRecordset.MoveFirst
If SourceRecordset.Fields(FieldName).Type = adBigInt Then
SourceRecordset.Find (FieldName & " = " & varFinds)
Else
SourceRecordset.Find (FieldName & " = " & "'" & varFinds & "'")
End If
If Not (SourceRecordset.BOF Or SourceRecordset.EOF) Then
RecordSetFindItem = SourceRecordset.Fields(fieldindex)
Else
RecordSetFindItem = Empty
End If
Else
RecordSetFindItem = Empty
End If
End Function
Public Sub GetFlexGridFirstColValue(ByVal flexGrid As MSHFlexGrid, varColValue As Variant)
If flexGrid.Rows <= 0 Or flexGrid.Cols <= 0 Or flexGrid.Row = 0 Then
Exit Sub
End If
With flexGrid
If .TextMatrix(.Row, 1) <> Empty Then
varColValue = .TextMatrix(.Row, 1)
Else
varColValue = Empty
End If
End With
End Sub
Public Sub IniGrid(ByVal flexGrid As MSHFlexGrid)
Dim i As Integer
flexGrid.Clear
With flexGrid
.Cols = 18
.Rows = 2
.FixedRows = 1
.FixedCols = 0
.SelectionMode = flexSelectionByRow
.TextMatrix(0, 1) = "工作证号"
.TextMatrix(0, 2) = "姓名"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -