📄 main_xtgl_czyjbsz.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form main_xtgl_czyjbsz
Caption = "系统管理-【操作员级别设置】"
ClientHeight = 2610
ClientLeft = 60
ClientTop = 345
ClientWidth = 4365
LinkTopic = "Form1"
ScaleHeight = 2610
ScaleWidth = 4365
StartUpPosition = 1 '所有者中心
Begin MSDataListLib.DataCombo DataCombo1
Bindings = "main_xtgl_czyjbsz.frx":0000
Height = 330
Left = 1200
TabIndex = 5
Top = 300
Width = 2820
_ExtentX = 4974
_ExtentY = 582
_Version = 393216
ListField = "操作员"
Text = ""
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 405
Left = 2220
TabIndex = 4
Top = 2070
Width = 1305
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 405
Left = 795
TabIndex = 3
Top = 2070
Width = 1305
End
Begin MSComctlLib.ImageList ImageList1
Left = -105
Top = 1785
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 10
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":0015
Key = "头像1"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":0EF1
Key = "头像2"
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":17CD
Key = "头像3"
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":20A9
Key = "头像4"
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":23C5
Key = "头像5"
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":2CA1
Key = "头像6"
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":357D
Key = "头像7"
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":3E59
Key = "头像8"
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":4735
Key = "头像9"
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":5011
Key = "头像10"
EndProperty
EndProperty
End
Begin MSComctlLib.ImageCombo ImageCombo1
Height = 330
Left = 1200
TabIndex = 2
Top = 1410
Width = 2820
_ExtentX = 4974
_ExtentY = 582
_Version = 393216
ForeColor = -2147483640
BackColor = -2147483643
ImageList = "ImageList1"
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = -1845
Top = 120
Visible = 0 'False
Width = 2175
_ExtentX = 3836
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=NBooks"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "NBooks"
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from qxb"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1200
TabIndex = 1
Top = 870
Width = 2820
End
Begin MSAdodcLib.Adodc Adodc2
Height = 330
Left = -1920
Top = 525
Visible = 0 'False
Width = 2175
_ExtentX = 3836
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=NBooks"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "NBooks"
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from qxb"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "操作员列表 级别设置 头像设置 "
Height = 1380
Left = 180
TabIndex = 0
Top = 405
Width = 1290
End
End
Attribute VB_Name = "main_xtgl_czyjbsz"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Myval, SQL As String '声明字符串变量
Dim Cnn As New ADODB.Connection '声明一个Connection对象
Private Sub Form_Load()
Dim NewItem As ComboItem '声明一个ComboItem对象
Dim i As Integer '声明一个整型变量
Combo1.AddItem ("系统管理员")
Combo1.AddItem ("高级操作员")
Combo1.AddItem ("普通操作员")
For i = 1 To 10
Set NewItem = ImageCombo1.ComboItems.Add(i, "头像" & i, "头像" & i, "头像" & i)
Next i
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.Enabled = True
End Sub
Private Sub Command1_Click()
If DataCombo1.text = "" Then
MsgBox "请选择操作员!"
Exit Sub
End If
If Combo1.text = "" Then
MsgBox "请选择操作员级别!"
Exit Sub
End If
If ImageCombo1.text = "" Then
MsgBox "请选择头像!"
Exit Sub
End If
Set Cnn = New ADODB.Connection
Cnn.Open "DSN=NBooks"
Adodc1.RecordSource = "select * from qxb where 操作员='" + DataCombo1.text + "'"
Adodc1.Refresh
With Adodc1.Recordset
If .RecordCount > 0 Then
If .Fields("操作员级别") <> Combo1.text Then
Myval = MsgBox("是否将【" & .Fields("操作员级别") & "】更新为【" & Combo1.text & "】?", vbYesNo, "询问窗口")
If Myval = vbYes Then
.Fields("操作员级别") = Combo1.text
.Update
End If
End If
If .Fields("头像") <> ImageCombo1.text Then
Myval = MsgBox("是否将【" & .Fields("头像") & "】更新为【" & ImageCombo1.text & "】?", vbYesNo, "询问窗口")
If Myval = vbYes Or vbNo Then
SQL = "Update qxb set 头像='" + ImageCombo1.text + "'where 操作员级别='" + Combo1.text + "'"
Cnn.Execute SQL
End If
End If
MsgBox ("您选择了【" & ImageCombo1.text & "】")
End If
End With
Cnn.Close
End Sub
Private Sub Command2_Click()
frm_main.Enabled = True
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -