operateset.frm
来自「一个关于电脑管理汽车的软件」· FRM 代码 · 共 285 行
FRM
285 行
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "Mscomctl.ocx"
Object = "{40D97E01-4259-4398-B597-183C348B488F}#1.0#0"; "BSE.ocx"
Begin VB.Form OperateSet
Caption = "操作员设置"
ClientHeight = 9225
ClientLeft = 60
ClientTop = 450
ClientWidth = 11355
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 9225
ScaleWidth = 11355
Begin BSE_Engine.BSE BSE1
Left = 600
Top = 8520
_ExtentX = 6588
_ExtentY = 1085
End
Begin VB.Frame Frame1
Height = 615
Left = 2760
TabIndex = 6
Top = 720
Width = 7455
Begin VB.Label Label1
Caption = "所拥有的权限"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400000&
Height = 255
Left = 3240
TabIndex = 7
Top = 240
Width = 2295
End
End
Begin VB.Frame frameInfo
Height = 855
Left = 0
TabIndex = 0
Top = -120
Width = 8055
Begin VB.CommandButton Command2
Height = 495
Index = 0
Left = 240
Picture = "OperateSet.frx":0000
Style = 1 'Graphical
TabIndex = 3
ToolTipText = "增加"
Top = 240
Width = 495
End
Begin VB.CommandButton Command2
Height = 495
Index = 1
Left = 840
Picture = "OperateSet.frx":014A
Style = 1 'Graphical
TabIndex = 2
ToolTipText = "修改"
Top = 240
Width = 495
End
Begin VB.CommandButton Command2
Height = 495
Index = 2
Left = 1440
Picture = "OperateSet.frx":0294
Style = 1 'Graphical
TabIndex = 1
ToolTipText = "删除"
Top = 240
Width = 495
End
End
Begin MSComctlLib.ListView lstAddress
Height = 7455
Left = 0
TabIndex = 4
Top = 720
Width = 2775
_ExtentX = 4895
_ExtentY = 13150
View = 3
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = 0 'False
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
ForeColor = 8388608
BackColor = -2147483628
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 4
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "Name"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "Address"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 2
Text = "City, State, Zip"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 3
Text = "Notes"
Object.Width = 2540
EndProperty
End
Begin MSComctlLib.ListView lstBillDocu
Height = 7455
Left = 2760
TabIndex = 5
Top = 1320
Width = 7455
_ExtentX = 13150
_ExtentY = 13150
View = 3
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = 0 'False
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
ForeColor = 8388608
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 4
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "Name"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "Address"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 2
Text = "City, State, Zip"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 3
Text = "Notes"
Object.Width = 2540
EndProperty
End
End
Attribute VB_Name = "OperateSet"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public ModifyBS As Boolean
Public lstBillDocuIndex As Long
Private Sub Command2_Click(Index As Integer)
Dim TempSQL As String
Select Case Index
Case 0
PopedomSet.Show 1
Case 1
If lstAddress.SelectedItem Is Nothing Then Exit Sub
ModifyBS = True
PopedomSet.Show 1
Case 2
If lstAddress.SelectedItem Is Nothing Then Exit Sub
If MsgBox("确定删除这条记录吗?", vbOKCancel) = vbOK Then
TempSQL = "Delete From operatesettable Where operatename = " & Quote(Trim(lstAddress.SelectedItem.SubItems(1)))
gCnn.Execute TempSQL
VarInitData.LoadData lstAddress, VarInitData.DisplaySQLVal(22)
VarInitData.LoadData lstBillDocu, VarInitData.DisplaySQLVal(23)
SurelstOK lstBillDocu, True
End If
End Select
End Sub
Private Sub Form_Activate()
SurelstOK lstBillDocu, True
End Sub
Private Sub Form_Load()
Dim i As Integer
VarInitData.InitBSE BSE1
VarInitData.LoadData lstAddress, VarInitData.DisplaySQLVal(22)
VarInitData.LoadData lstBillDocu, VarInitData.DisplaySQLVal(23), 3
End Sub
Private Sub Form_Resize()
If Me.ScaleHeight > 0 And Me.ScaleWidth > 0 Then
frameInfo.left = Me.ScaleLeft
frameInfo.top = Me.ScaleTop
frameInfo.Width = Me.ScaleWidth
lstAddress.top = frameInfo.top + frameInfo.Height
lstAddress.Height = Me.ScaleHeight - frameInfo.Height - 50
Frame1.left = lstAddress.Width + 100
Frame1.top = lstAddress.top
Frame1.Width = Me.ScaleWidth - lstAddress.Width - 140
lstBillDocu.top = Frame1.top + Frame1.Height
lstBillDocu.left = lstAddress.left + lstAddress.Width + 50
lstBillDocu.Width = Me.ScaleWidth - lstAddress.Width - 140
lstBillDocu.Height = Me.ScaleHeight - frameInfo.Height - Frame1.Height - 50
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
If BSE1.EngineStarted Then BSE1.EndSubClassing
End Sub
Public Sub SurelstOK(lstBillDocu As ListView, Optional ModifyBS As Boolean = False)
Dim i As Integer
Dim MyItem As ListItems
Dim TempSQL As String
Dim TempRS As MYSQL_RS
Dim TempKey As String
lstBillDocu.ColumnHeaders(1).Width = 400
lstBillDocu.ColumnHeaders(2).Width = 6000
If Not lstAddress.SelectedItem Is Nothing Then
lstBillDocuIndex = lstAddress.SelectedItem.Index
TempKey = OperateSet.lstAddress.SelectedItem.SubItems(1)
Else
TempKey = ""
End If
Set MyItem = lstBillDocu.ListItems
Set TempRS = New MYSQL_RS
TempSQL = "select * from operatesettable where operatename = " & Quote(TempKey)
TempRS.OpenRs TempSQL, gCnn
For i = 1 To MyItem.Count
With MyItem(i)
If Val(TempRS.Fields("qx" & i)) > 0 And ModifyBS Then
.Text = VarInitData.OKSymbol
Else
.Text = ""
End If
End With
Next i
TempRS.CloseRecordset
TempRS.ReleaseMemory
Set TempRS = Nothing
End Sub
Private Sub lstAddress_ItemClick(ByVal Item As MSComctlLib.ListItem)
If lstBillDocuIndex <> Item.Index Then
lstBillDocuIndex = Item.Index
VarInitData.LoadData lstBillDocu, VarInitData.DisplaySQLVal(23)
SurelstOK lstBillDocu, True
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?