📄 frmlamuseedit.frm
字号:
VERSION 5.00
Begin VB.Form FrmlamuseEdit
BorderStyle = 1 'Fixed Single
Caption = "编辑线路娱乐信息"
ClientHeight = 3135
ClientLeft = 45
ClientTop = 330
ClientWidth = 4815
Icon = "FrmlamuseEdit.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3135
ScaleWidth = 4815
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Height = 2175
Left = 240
TabIndex = 2
Top = 120
Width = 4335
Begin VB.TextBox txtPrice
Alignment = 1 'Right Justify
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 3360
MaxLength = 10
TabIndex = 8
Text = "0"
Top = 1643
Width = 735
End
Begin VB.ComboBox ComboItem
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
ItemData = "FrmlamuseEdit.frx":0442
Left = 1320
List = "FrmlamuseEdit.frx":044C
Style = 2 'Dropdown List
TabIndex = 7
Top = 1185
Width = 2775
End
Begin VB.TextBox txtAtimes
Alignment = 1 'Right Justify
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 1320
MaxLength = 10
TabIndex = 6
Text = "0"
Top = 1643
Width = 735
End
Begin VB.ComboBox ComboName
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 2400
Style = 2 'Dropdown List
TabIndex = 5
Top = 255
Width = 1695
End
Begin VB.ComboBox ComboType
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
ItemData = "FrmlamuseEdit.frx":045C
Left = 1320
List = "FrmlamuseEdit.frx":0469
Style = 2 'Dropdown List
TabIndex = 4
Top = 255
Width = 975
End
Begin VB.ComboBox ComboAmuse
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 1320
Style = 2 'Dropdown List
TabIndex = 3
Top = 720
Width = 2775
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "娱乐报价"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 2400
TabIndex = 13
Top = 1710
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "娱乐项目"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 240
TabIndex = 12
Top = 1245
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "娱乐厅名称"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 240
TabIndex = 11
Top = 780
Width = 900
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "娱乐次数"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 240
TabIndex = 10
Top = 1710
Width = 720
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "所属地域"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 240
TabIndex = 9
Top = 315
Width = 720
End
End
Begin VB.CommandButton Cmd_Ok
Caption = "确 定"
Default = -1 'True
Height = 400
Left = 840
MouseIcon = "FrmlamuseEdit.frx":047F
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 1
Top = 2520
Width = 1300
End
Begin VB.CommandButton Cmd_Cancel
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 2670
MouseIcon = "FrmlamuseEdit.frx":0789
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 0
Top = 2520
Width = 1300
End
End
Attribute VB_Name = "FrmlamuseEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriId As Long
Public OriAreaName, OriAmuse, OriItem As String
Public OriType As Integer
Private Function SetPrice()
Dim TmpId, TmpIid As Long
TmpId = MyAmuse.GetId(ComboAmuse.Text)
TmpIid = MyAitem.GetId(TmpId, ComboItem.Text)
'读取娱乐项目信息
MyAitem.GetInfo (TmpIid)
txtPrice = MyAitem.Price * Val(txtAtimes)
End Function
Private Function Check() As Boolean
If Trim(ComboName) = "" Then
MsgBox "请选择地域名称"
Check = False
Exit Function
End If
If Trim(ComboAmuse) = "" Then
MsgBox "请选择娱乐厅名称"
Check = False
Exit Function
End If
Check = True
End Function
Private Sub Load_Amuse()
Dim TmpId As Long
Dim i As Integer
ComboAmuse.Clear
TmpId = MyArea.GetId(ComboName.Text)
MyAmuse.LoadAmuse_ByArea (TmpId)
i = 0
Do While ArrAmuse(i) <> ""
ComboAmuse.AddItem ArrAmuse(i)
i = i + 1
Loop
End Sub
Private Sub Load_Item()
Dim TmpId As Long
Dim i As Integer
ComboItem.Clear
TmpId = MyAmuse.GetId(ComboAmuse.Text)
MyAitem.LoadItem_ByAmuse (TmpId)
i = 0
Do While ArrItem(i) <> ""
ComboItem.AddItem ArrItem(i)
i = i + 1
Loop
End Sub
Private Sub Cmd_OK_Click()
Dim TmpId As Integer
If Check = False Then
Exit Sub
End If
With Mylamuse
.lid = MyLine.lid
'首先读取娱乐厅编号
TmpId = MyAmuse.GetId(ComboAmuse.Text)
'读取娱乐项目编号
.Iid = MyAitem.GetId(TmpId, ComboItem.Text)
.aTimes = Val(txtAtimes)
'判断娱乐项目名称是否存在
If Modify = False Or OriAmuse <> Trim(ComboAmuse) Or OriItem <> Trim(ComboItem) Then
If .In_DB(.lid, .Iid) = True Then
MsgBox "当前娱乐项目已经存在,请重新输入"
Exit Sub
End If
End If
If Modify = False Then
.Insert
Else
Call .Update(MyLine.lid, OriId)
End If
End With
Unload Me
End Sub
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub ComboName_Click()
'装入娱乐厅数据
Load_Amuse
If ComboAmuse.ListCount > 0 Then
ComboAmuse.ListIndex = 0
End If
'计算报价
SetPrice
End Sub
Private Sub ComboAmuse_Click()
'装入娱乐项目数据
Load_Item
If ComboItem.ListCount > 0 Then
ComboItem.ListIndex = 0
End If
'计算报价
SetPrice
End Sub
Private Sub ComboType_Click()
'装入地域数据
Call Loadarea(ComboType.ListIndex + 1, ComboName)
If ComboName.ListCount > 0 Then
ComboName.ListIndex = 0
End If
'装入娱乐厅数据
Load_Amuse
If ComboAmuse.ListCount > 0 Then
ComboAmuse.ListIndex = 0
End If
'装入娱乐项目数据
Load_Item
If ComboItem.ListCount > 0 Then
ComboItem.ListIndex = 0
End If
'计算报价
SetPrice
End Sub
Private Sub Form_Load()
If Modify = False Then
ComboType.ListIndex = 0
Call Loadarea(1, ComboName)
If ComboName.ListCount > 0 Then
ComboName.ListIndex = 0
End If
'装入娱乐厅数据
Load_Amuse
If ComboAmuse.ListCount > 0 Then
ComboAmuse.ListIndex = 0
End If
'装入娱乐项目数据
Load_Item
If ComboItem.ListCount > 0 Then
ComboItem.ListIndex = 0
End If
'计算报价
SetPrice
Else
ComboType.ListIndex = OriType - 1
Call Loadarea(OriType, ComboName)
If InCombo(OriAreaName, ComboName) = True Then
ComboName.Text = OriAreaName
End If
'装入娱乐厅数据
Load_Amuse
If InCombo(OriAmuse, ComboAmuse) = True Then
ComboAmuse.Text = OriAmuse
End If
'装入娱乐项目数据
Load_Item
If InCombo(OriItem, ComboItem) = True Then
ComboItem.Text = OriItem
End If
'计算报价
SetPrice
End If
End Sub
Private Sub txtAtimes_KeyPress(KeyAscii As Integer)
If In_Int(KeyAscii) = False Then
KeyAscii = 0
End If
End Sub
Private Sub txtAtimes_Change()
SetPrice
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -