📄 frmuserview.frm
字号:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "comctl32.ocx"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmUserView
Caption = "人员资料管理"
ClientHeight = 7620
ClientLeft = 60
ClientTop = 450
ClientWidth = 9600
Icon = "frmUserView.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
ScaleHeight = 7620
ScaleWidth = 9600
StartUpPosition = 3 '窗口缺省
WindowState = 2 'Maximized
Begin MSComctlLib.TreeView TreeView1
Height = 4995
Left = 30
TabIndex = 12
ToolTipText = "右键可以对部门进行新增和删除操作"
Top = 1230
Width = 2535
_ExtentX = 4471
_ExtentY = 8811
_Version = 393217
Indentation = 353
LabelEdit = 1
LineStyle = 1
Style = 7
Appearance = 1
End
Begin MSComctlLib.ImageList ImageList1
Left = 1320
Top = 6660
_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 = "frmUserView.frx":014A
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmUserView.frx":06F0
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmUserView.frx":0C42
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.ListView ListView1
Height = 4935
Left = 2610
TabIndex = 10
ToolTipText = "右键可以新增、查看和修改资料,双击可以查看资料"
Top = 1260
Width = 6435
_ExtentX = 11351
_ExtentY = 8705
View = 3
LabelEdit = 1
MultiSelect = -1 'True
LabelWrap = -1 'True
HideSelection = -1 'True
Checkboxes = -1 'True
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
NumItems = 0
End
Begin VB.CommandButton Command4
Caption = "新增(&N)"
Height = 405
Left = 4020
TabIndex = 9
Top = 6780
Width = 1185
End
Begin VB.CommandButton Command3
Caption = "修改(&E)"
Height = 405
Left = 5280
TabIndex = 7
Top = 6780
Width = 1185
End
Begin VB.CommandButton Command2
Caption = "删除(&D)"
Height = 405
Left = 6540
TabIndex = 6
Top = 6780
Width = 1185
End
Begin VB.CommandButton Command1
Caption = "退出(&C)"
Height = 405
Left = 7800
TabIndex = 5
Top = 6780
Width = 1155
End
Begin ComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 315
Left = 0
TabIndex = 4
Top = 7305
Width = 9600
_ExtentX = 16933
_ExtentY = 556
SimpleText = ""
_Version = 327682
BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7}
NumPanels = 2
BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7}
Object.Width = 5292
MinWidth = 5292
TextSave = ""
Key = ""
Object.Tag = ""
EndProperty
BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7}
AutoSize = 1
Object.Width = 11086
TextSave = ""
Key = ""
Object.Tag = ""
EndProperty
EndProperty
End
Begin VB.PictureBox Picture1
BackColor = &H8000000E&
BorderStyle = 0 'None
Height = 1155
Left = 0
ScaleHeight = 1155
ScaleWidth = 9555
TabIndex = 0
Top = 0
Width = 9555
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "实现对人员资料的添加、删除、修改等操作。"
Height = 195
Left = 960
TabIndex = 2
Top = 720
Width = 3600
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "人员资料一览表"
BeginProperty Font
Name = "黑体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 330
TabIndex = 1
Top = 210
Width = 2100
End
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "Label3"
Height = 195
Left = 120
TabIndex = 11
Top = 6840
Width = 480
End
Begin VB.Label lblLineTop
BackColor = &H8000000E&
BorderStyle = 1 'Fixed Single
Height = 45
Left = 0
TabIndex = 8
Top = 1170
Width = 9585
End
Begin VB.Label lblLineBottom
BackColor = &H8000000E&
BorderStyle = 1 'Fixed Single
Height = 45
Left = 0
TabIndex = 3
Top = 6600
Width = 9435
End
Begin VB.Menu mnuFile
Caption = "file"
Visible = 0 'False
Begin VB.Menu mnuFile_new
Caption = "新增资料"
End
Begin VB.Menu mnuFile_sep1
Caption = "-"
End
Begin VB.Menu mnuFile_View
Caption = "查看资料"
End
Begin VB.Menu mnuFile_sep2
Caption = "-"
End
Begin VB.Menu mnuFile_Edit
Caption = "修改资料"
End
End
Begin VB.Menu mnuFile2
Caption = "file2"
Visible = 0 'False
Begin VB.Menu mnuFile2_new
Caption = "新增部门"
End
Begin VB.Menu mnuFile2_sep1
Caption = "-"
End
Begin VB.Menu mnuFile2_delete
Caption = "删除部门"
End
End
End
Attribute VB_Name = "frmUserView"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim rs As New ADODB.Recordset
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command2_Click()
Dim I As Integer
Dim strDelete As String
Dim curUserID As String
Dim blIsCheck As Boolean
If Me.ListView1.ListItems.Count = 0 Then Exit Sub
For I = 1 To Me.ListView1.ListItems.Count
If Me.ListView1.ListItems(I).Checked = True Then
blIsCheck = True
Exit For
End If
Next
If Not blIsCheck Then
MsgBox "没有选择要删除的人员资料记录!", vbInformation, "提示"
Exit Sub
End If
If MsgBox("是否真的删除打钩号的记录!", vbYesNo, "提示") = vbNo Then Exit Sub
For I = 1 To Me.ListView1.ListItems.Count
If Me.ListView1.ListItems(I).Checked = True Then
curUserID = Me.ListView1.ListItems(I).SubItems(1)
'检测是否已经分配给GPS终端
Set rs = Nothing
rs.Open "select * from tbl_GPS where UserID='" & curUserID & "'", gblCn, adOpenKeyset, adLockOptimistic, adCmdText
If rs.RecordCount > 0 Then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -