📄 frmcheck.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 frmCheck
Caption = "复核员管理"
ClientHeight = 7515
ClientLeft = 60
ClientTop = 345
ClientWidth = 9570
Icon = "frmCheck.frx":0000
LinkTopic = "Form2"
MDIChild = -1 'True
ScaleHeight = 7515
ScaleWidth = 9570
WindowState = 2 'Maximized
Begin VB.CommandButton cmdExit
Cancel = -1 'True
Caption = "退出[&X]"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 7650
TabIndex = 0
Top = 7110
Width = 1605
End
Begin VB.CommandButton cmdDel
Caption = "删除[&D]"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 6060
TabIndex = 1
Top = 7110
Width = 1605
End
Begin VB.CommandButton cmdOK
Caption = "添加[&A]"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 4470
TabIndex = 2
Top = 7110
Width = 1605
End
Begin TabDlg.SSTab sstabBk
Height = 6465
Left = 210
TabIndex = 3
Top = 420
Width = 9075
_ExtentX = 16007
_ExtentY = 11404
_Version = 393216
Style = 1
Tabs = 1
TabsPerRow = 1
TabHeight = 706
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
TabCaption(0) = " 复核员信息管理 "
TabPicture(0) = "frmCheck.frx":08CA
Tab(0).ControlEnabled= -1 'True
Tab(0).Control(0)= "Label3"
Tab(0).Control(0).Enabled= 0 'False
Tab(0).Control(1)= "Label2"
Tab(0).Control(1).Enabled= 0 'False
Tab(0).Control(2)= "txtNewOpNo"
Tab(0).Control(2).Enabled= 0 'False
Tab(0).Control(3)= "txtDcyName"
Tab(0).Control(3).Enabled= 0 'False
Tab(0).Control(4)= "Frame1"
Tab(0).Control(4).Enabled= 0 'False
Tab(0).ControlCount= 5
Begin VB.Frame Frame1
Height = 4995
Left = 210
TabIndex = 6
Top = 480
Width = 8685
Begin MSComctlLib.ListView lstDcy
Height = 4665
Index = 0
Left = 120
TabIndex = 7
Top = 210
Visible = 0 'False
Width = 8445
_ExtentX = 14896
_ExtentY = 8229
View = 3
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = -1 'True
FullRowSelect = -1 'True
_Version = 393217
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 11.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 3
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "登录用户名"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "用户姓名"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 2
Text = "密码"
Object.Width = 2540
EndProperty
End
End
Begin VB.TextBox txtDcyName
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 5820
MaxLength = 8
TabIndex = 5
Top = 5730
Width = 1725
End
Begin VB.TextBox txtNewOpNo
Alignment = 1 'Right Justify
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 2130
MaxLength = 7
TabIndex = 4
Top = 5730
Width = 1725
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "复核员姓名:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 4440
TabIndex = 9
Top = 5790
Width = 1320
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "复核员工号:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 750
TabIndex = 8
Top = 5790
Width = 1320
End
End
End
Attribute VB_Name = "frmCheck"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdDel_Click()
Dim rs As New ADODB.Recordset
On Error Resume Next
If MsgBox("确认要删除员工『" + txtDcyName + "』吗?", vbYesNo, "提示信息...") = vbYes Then
rs.Open "ZYSP_DEL_USERS " + Trim(txtNewOpNo), cnn, adOpenStatic, adLockOptimistic
If Err.Number <> 0 Then
MsgBox "删除失败?", vbCritical, "提示信息..."
Else
Call lstRef
txtDcyName = ""
txtNewOpNo = ""
MsgBox "已经删除成功! ", vbInformation, "提示信息..."
End If
End If
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
Dim acmd As New Command
Dim param As ADODB.Parameter
On Error Resume Next
If txtDcyName = "" Then
MsgBox "数据输入不全,请添全数据! ", , "提示信息..."
Exit Sub
End If
With acmd
.ActiveConnection = cnn
.CommandText = "ZYSP_ADD_USERS"
.CommandType = adCmdStoredProc
.Parameters.Append .CreateParameter("@UID", adChar, adParamInput, 7, Trim(txtNewOpNo))
.Parameters.Append .CreateParameter("@USERNAME", adChar, adParamInput, 50, Trim(txtDcyName))
.Parameters.Append .CreateParameter("@bErrNum", adBigInt, adParamOutput)
.Execute '
If Err.Number <> 0 Then
MsgBox "数据输入失败! 此条记录已经录入不能重复输入!", , "提示信息..."
Debug.Print Err.Description
Else
If .Parameters("@bErrNum") = 0 Then
Call lstRef
MsgBox "数据成功!", , "提示信息..."
Else
MsgBox "数据输入失败! 此条记录已经录入不能重复输入!", , "提示信息..."
End If
End If
End With
txtNewOpNo.SetFocus
End Sub
Private Sub Form_Load()
Call lstRef
End Sub
Private Sub lstRef()
Dim rs As New ADODB.Recordset
On Error Resume Next
Unload lstDcy(1)
Load lstDcy(1)
lstDcy(1).Visible = True
rs.Open "select * from zy_users", cnn, adOpenStatic, adLockOptimistic
i = 1
Do While Not rs.EOF
lstDcy(1).ListItems.Add , "A" + CStr(i), rs.Fields(0)
lstDcy(1).ListItems(i).ListSubItems.Add , "A" + CStr(i), Trim(rs.Fields(1))
lstDcy(1).ListItems(i).ListSubItems.Add , "B" + CStr(i), addStar(Len(Trim(rs.Fields(2))))
lstDcy(1).ListItems(i).ListSubItems.Add , "C" + CStr(i), Trim(rs.Fields(3))
rs.MoveNext
i = i + 1
Loop
End Sub
Private Function addStar(starlen As Integer) As String
For i = 1 To starlen
addStar = addStar + "*"
Next i
End Function
Private Sub lstDcy_DblClick(Index As Integer)
Call cmdDel_Click
End Sub
Private Sub lstDcy_ItemClick(Index As Integer, ByVal Item As MSComctlLib.ListItem)
If Index = 1 Then
txtNewOpNo = Trim(Item.Text)
txtDcyName = Trim(Item.ListSubItems(1).Text)
End If
End Sub
Private Sub txtDcyName_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmdOK.SetFocus
End If
End Sub
Private Sub txtNewOpNo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtDcyName.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -