?? frm_qxgl.frm
字號(hào):
VERSION 5.00
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 frm_qxgl
BorderStyle = 1 'Fixed Single
Caption = "權(quán)限管理"
ClientHeight = 3465
ClientLeft = 45
ClientTop = 330
ClientWidth = 6525
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3465
ScaleWidth = 6525
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame4
Caption = "操作員"
Height = 3360
Left = 60
TabIndex = 6
Top = 60
Width = 1725
Begin MSDataListLib.DataList DataList1
Bindings = "frm_qxgl.frx":0000
Height = 2790
Left = 60
TabIndex = 10
Top = 330
Width = 1590
_ExtentX = 2805
_ExtentY = 4921
_Version = 393216
ListField = "操作員姓名"
End
End
Begin VB.Frame Frame3
Caption = "權(quán)限設(shè)置"
Height = 2790
Left = 1755
TabIndex = 0
Top = 60
Width = 4710
Begin VB.CheckBox Check1
Caption = "系統(tǒng)管理"
Height = 375
Index = 8
Left = 3135
TabIndex = 8
Top = 2310
Width = 1545
End
Begin VB.CheckBox Check1
Caption = "管理部"
Height = 375
Index = 3
Left = 3135
TabIndex = 7
Top = 540
Width = 1545
End
Begin VB.CheckBox Check1
Caption = "經(jīng)理室"
Height = 390
Index = 7
Left = 3135
TabIndex = 5
Top = 1950
Width = 1185
End
Begin VB.CheckBox Check1
Caption = "保安部"
Height = 375
Index = 6
Left = 3135
TabIndex = 4
Top = 1620
Width = 1545
End
Begin VB.CheckBox Check1
Caption = "財(cái)務(wù)部"
Height = 375
Index = 5
Left = 3135
TabIndex = 3
Top = 1260
Width = 1545
End
Begin VB.CheckBox Check1
Caption = "工程部"
Height = 375
Index = 4
Left = 3135
TabIndex = 2
Top = 885
Width = 1545
End
Begin VB.CheckBox Check1
Caption = "經(jīng)營(yíng)部"
Height = 375
Index = 2
Left = 3135
TabIndex = 1
Top = 210
Width = 1545
End
Begin VB.Image Image1
Height = 2355
Left = 120
Picture = "frm_qxgl.frx":0015
Stretch = -1 'True
Top = 270
Width = 2835
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = -1455
Top = 2010
Visible = 0 'False
Width = 1860
_ExtentX = 3281
_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= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db_wygl.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db_wygl.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from tab_power"
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.Frame Frame2
Height = 675
Left = 1755
TabIndex = 9
Top = 2730
Width = 4710
Begin VB.CommandButton Command4
Caption = "退出"
Height = 375
Left = 3465
TabIndex = 14
Top = 180
Width = 1065
End
Begin VB.CommandButton Command3
Caption = "確定"
Height = 375
Left = 2415
TabIndex = 13
Top = 180
Width = 1065
End
Begin VB.CommandButton Command2
Caption = "全不選"
Height = 375
Left = 1110
TabIndex = 12
Top = 180
Width = 1065
End
Begin VB.CommandButton Command1
Caption = "全選"
Height = 375
Left = 60
TabIndex = 11
Top = 180
Width = 1065
End
End
Begin MSAdodcLib.Adodc Adodc2
Height = 330
Left = 0
Top = 0
Visible = 0 'False
Width = 1860
_ExtentX = 3281
_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= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db_wygl.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db_wygl.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from tab_power"
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
End
Attribute VB_Name = "frm_qxgl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer '定義一個(gè)整型變量
Private Sub Form_load()
For i = 2 To 8
Check1(i).Value = 1
Next i
End Sub
Private Sub DataList1_Click()
'查看操作員權(quán)限
Adodc2.RecordSource = "select * from tab_power where 操作員姓名='" & Trim(DataList1.BoundText) & "'"
Adodc2.Refresh
If Adodc2.Recordset.RecordCount > 0 Then
For i = 2 To 8
If Adodc2.Recordset.Fields(i) = 0 Then Check1(i).Value = 1 Else Check1(i).Value = 0
Next i
Adodc2.Recordset.Update '更新記錄
End If
End Sub
Private Sub Command1_Click()
'全選
For i = 2 To 8
Check1(i).Value = 1
Next i
End Sub
Private Sub Command2_Click()
'全不選
For i = 2 To 8
Check1(i).Value = 0
Next i
End Sub
Private Sub Command3_Click()
'為操作員設(shè)置權(quán)限
If DataList1.SelectedItem Then
If DataList1.BoundText <> "" Then
Adodc2.RecordSource = "select * from tab_power where 操作員姓名='" & DataList1.BoundText & "'"
Adodc2.Refresh
With Adodc2.Recordset
If .RecordCount > 0 Then
For i = 2 To 8
If Check1(i).Value = 1 Then .Fields(i) = 0 Else .Fields(i) = 1
Next i
.Update '更新記錄
End If
End With
End If
MsgBox "設(shè)置權(quán)限已完成!"
Else
MsgBox "請(qǐng)選擇操作員!"
End If
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -