📄 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
BackColor = &H00C1FFEB&
BorderStyle = 1 'Fixed Single
Caption = "系统管理-【操作员级别设置】"
ClientHeight = 2460
ClientLeft = 45
ClientTop = 330
ClientWidth = 4950
Icon = "main_xtgl_czyjbsz.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2460
ScaleWidth = 4950
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame1
BackColor = &H00C1FFEB&
Height = 2070
Left = 45
TabIndex = 2
Top = 15
Width = 4860
Begin VB.ComboBox Combo1
Height = 300
Left = 1770
TabIndex = 5
Top = 930
Width = 2820
End
Begin MSDataListLib.DataCombo DataCombo1
Bindings = "main_xtgl_czyjbsz.frx":0CCA
Height = 330
Left = 1785
TabIndex = 3
Top = 420
Width = 2820
_ExtentX = 4974
_ExtentY = 582
_Version = 393216
ListField = "操作员"
Text = ""
End
Begin MSComctlLib.ImageList ImageList1
Left = 0
Top = 1485
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 26
ImageHeight = 26
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":0CDF
Key = "头像1"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":48EF
Key = "头像2"
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":856F
Key = "头像3"
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":C3AD
Key = "头像4"
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":10013
Key = "头像5"
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":140A8
Key = "头像6"
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":17EEC
Key = "头像7"
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":1BBBB
Key = "头像8"
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":1FA1C
Key = "头像9"
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czyjbsz.frx":236D1
Key = "头像10"
EndProperty
EndProperty
End
Begin MSComctlLib.ImageCombo ImageCombo1
Height = 480
Left = 1785
TabIndex = 4
Top = 1440
Width = 2820
_ExtentX = 4974
_ExtentY = 847
_Version = 393216
ForeColor = -2147483640
BackColor = -2147483643
ImageList = "ImageList1"
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "操作员列表 级别设置 头像设置 "
Height = 1755
Left = 510
TabIndex = 6
Top = 450
Width = 1305
End
End
Begin MSAdodcLib.Adodc Adodc2
Height = 330
Left = 90
Top = 4290
Visible = 0 'False
Width = 1785
_ExtentX = 3149
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc2"
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 MSAdodcLib.Adodc Adodc1
Height = 330
Left = 2010
Top = 4260
Visible = 0 'False
Width = 1905
_ExtentX = 3360
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
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.CommandButton Command2
Caption = "退出"
Height = 350
Left = 3915
TabIndex = 1
Top = 2115
Width = 990
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 350
Left = 2940
TabIndex = 0
Top = 2115
Width = 990
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()
'自动识别路径
Adodc1.ConnectionString = "DSN=NBooks"
Adodc1.RecordSource = "select * from qxb"
Adodc1.Refresh
Adodc2.ConnectionString = "DSN=NBooks"
Adodc2.RecordSource = "select * from qxb"
Adodc2.Refresh
Dim NewItem As ComboItem '声明一个ComboItem对象
Dim i As Integer '声明一个整型变量
Combo1.AddItem ("系统管理员") '向Combo控件中添加数据项
Combo1.AddItem ("高级操作员") '向Combo控件中添加数据项
Combo1.AddItem ("普通操作员") '向Combo控件中添加数据项
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
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
Call main
SQL = "Update qxb set 头像='" + ImageCombo1.text + "'where 操作员级别='" + Combo1.text + "'"
adoCon.Execute SQL
adoCon.Close
End If
End If
MsgBox "权限修改完毕,您选择了【" & ImageCombo1.text & "】", , "图书综合管理系统"
End If
End With
End Sub
Private Sub Command2_Click() '退出
frm_main.Enabled = True
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -