📄 frm_czysz.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frm_czysz
BorderStyle = 3 'Fixed Dialog
Caption = "操作员权限设置"
ClientHeight = 2955
ClientLeft = 45
ClientTop = 330
ClientWidth = 6720
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2955
ScaleWidth = 6720
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame3
Height = 660
Left = 3000
TabIndex = 15
Top = 2250
Width = 3615
Begin VB.CommandButton Cmd_sq
Caption = "授权"
Enabled = 0 'False
Height = 375
Left = 120
TabIndex = 18
Top = 200
Width = 975
End
Begin VB.CommandButton Cmd_Cancel
Caption = "取消"
Height = 375
Left = 1320
TabIndex = 17
Top = 200
Width = 975
End
Begin VB.CommandButton Cmd_exit
Caption = "关闭"
Height = 375
Left = 2520
TabIndex = 16
Top = 200
Width = 975
End
End
Begin VB.TextBox Text10
DataField = "id"
DataSource = "Adodc1"
Height = 270
Left = 1440
TabIndex = 14
Text = "Text10"
Top = 5520
Width = 1095
End
Begin VB.TextBox Text8
Height = 375
Left = 4920
TabIndex = 13
Text = "Text8"
Top = 5640
Width = 1455
End
Begin VB.TextBox Text7
Height = 375
Left = 3120
TabIndex = 12
Text = "Text7"
Top = 5280
Width = 1335
End
Begin VB.TextBox Text6
DataField = "用户名"
DataSource = "Adodc1"
Height = 270
Left = 1320
TabIndex = 11
Text = "Text6"
Top = 5040
Width = 1215
End
Begin VB.TextBox Text5
Height = 375
Left = 3840
TabIndex = 10
Text = "1"
Top = 7200
Width = 1335
End
Begin VB.TextBox Text1
DataField = "用户名"
DataSource = "Adodc1"
Height = 375
Left = 5160
TabIndex = 9
Text = "Text1"
Top = 7080
Width = 1215
End
Begin MSComctlLib.ImageList ImageList1
Left = 6600
Top = 4920
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 32
ImageHeight = 32
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 1
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frm_czysz.frx":0000
Key = ""
EndProperty
EndProperty
End
Begin VB.Frame Frame2
Caption = "设置权限"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C000C0&
Height = 2055
Index = 0
Left = 3000
TabIndex = 1
Top = 120
Width = 3615
Begin VB.CheckBox Check8
Caption = " 报表统计"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00008000&
Height = 255
Left = 1920
TabIndex = 7
Top = 1560
Width = 1335
End
Begin VB.CheckBox Check7
Caption = " 库存管理"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00008000&
Height = 255
Left = 360
TabIndex = 6
Top = 1560
Width = 1335
End
Begin VB.CheckBox Check5
Caption = " 退货管理"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00008000&
Height = 255
Left = 1920
TabIndex = 5
Top = 960
Width = 1500
End
Begin VB.CheckBox Check3
Caption = " 到货管理"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00008000&
Height = 255
Left = 360
TabIndex = 4
Top = 960
Width = 1335
End
Begin VB.CheckBox Check2
Caption = " 采购管理"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00008000&
Height = 330
Left = 1920
TabIndex = 3
Top = 360
Width = 1335
End
Begin VB.CheckBox Check1
Caption = " 系统设置"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00008000&
Height = 375
Left = 360
TabIndex = 2
Top = 360
Width = 1575
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 3600
Top = 4680
Width = 2655
_ExtentX = 4683
_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=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=cggl"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=cggl"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from Table_xxdl"
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 Frame1
Caption = "操作员设置"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C000C0&
Height = 2775
Left = 120
TabIndex = 0
Top = 120
Width = 2775
Begin MSComctlLib.ListView ListView1
Height = 2415
Left = 120
TabIndex = 8
Top = 240
Width = 2535
_ExtentX = 4471
_ExtentY = 4260
LabelWrap = -1 'True
HideSelection = -1 'True
_Version = 393217
Icons = "ImageList1"
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
NumItems = 0
End
End
End
Attribute VB_Name = "frm_czysz"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim itmX As ListItem '定义一个ListItem对象
Dim a
Dim key As String '定义字符串变量
Private Sub Cmd_cancel_Click()
Check1.Value = 0
Check2.Value = 0
Check3.Value = 0
Check5.Value = 0
Check7.Value = 0
Check8.Value = 0
End Sub
Private Sub Cmd_exit_Click()
Unload Me
End Sub
Private Sub Cmd_sq_Click() '操作员授权
Call main
Adodc1.RecordSource = "select * from Table_xxdl order by id"
' Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveLast
Text5.Text = Adodc1.Recordset.Fields("id")
Text5.Text = Val(Text5.Text) + 1
Else
Text5.Text = 1
End If
Text7.Text = Adodc1.Recordset.Fields("用户名")
Text8.Text = Adodc1.Recordset.Fields("口令")
Adodc1.Recordset.Delete
Set adoRs = adoCon.Execute("insert into Table_xxdl values(" & Text5 & ",'" & Text7 & "','" & Text8 & "','" & Check1 & "','" & Check2 & "','" & Check3 & "','" & Check5 & "','" & Check7 & "','" & Check8 & "')")
MsgBox "成功授权!!", 48, "采购管理系统"
Cmd_sq.Enabled = False
adoCon.Close
End Sub
Private Sub Form_Load()
frm_main.StatusBar1.Panels(1).Text = " 当前操作: " & Me.Caption
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
a = Text1.Text
Adodc1.RecordSource = "select * from Table_xxdl"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
ListView1.Enabled = True
ListView1.ListItems.Clear
Adodc1.Recordset.MoveFirst
Do While Adodc1.Recordset.EOF = False
key = Text1.Text
Set itmX = ListView1.ListItems.Add(, , key, 1)
Adodc1.Recordset.MoveNext
Loop
Adodc1.RecordSource = "select * from Table_xxdl where 用户名='" + Text6.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Check1.Value = Adodc1.Recordset.Fields("系统维护")
Check2.Value = Adodc1.Recordset.Fields("采购管理")
Check3.Value = Adodc1.Recordset.Fields("到货管理")
Check5.Value = Adodc1.Recordset.Fields("退货管理")
Check7.Value = Adodc1.Recordset.Fields("库存管理")
Check8.Value = Adodc1.Recordset.Fields("报表统计")
Else
End If
Else
ListView1.Enabled = False
End If
End Sub
Private Sub ListView1_Click()
Text6.Text = ListView1.SelectedItem
Cmd_sq.Enabled = True
'ListView1.SelectedItem.ForeColor = RGB(0, 0, 200)
Adodc1.RecordSource = "select * from Table_xxdl where 用户名='" + ListView1.SelectedItem + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Frame2(0).Caption = "操作员 " + Trim(ListView1.SelectedItem.Text) + " 的权限设置"
Check1.Value = Adodc1.Recordset.Fields("系统维护")
Check2.Value = Adodc1.Recordset.Fields("采购管理")
Check3.Value = Adodc1.Recordset.Fields("到货管理")
Check5.Value = Adodc1.Recordset.Fields("退货管理")
Check7.Value = Adodc1.Recordset.Fields("库存管理")
Check8.Value = Adodc1.Recordset.Fields("报表统计")
Else
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.StatusBar1.Panels(1).Text = " 吉林省明日科技有限公司"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -