📄 aitemman.frm
字号:
VERSION 5.00
Begin VB.Form AitemMan
BorderStyle = 1 'Fixed Single
Caption = "娱乐项目管理"
ClientHeight = 3840
ClientLeft = 45
ClientTop = 330
ClientWidth = 5655
Icon = "AitemMan.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3840
ScaleWidth = 5655
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Cmd_Add
Caption = "添 加"
Default = -1 'True
Height = 400
Left = 2640
MouseIcon = "AitemMan.frx":27A2
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 9
Top = 2400
Width = 1300
End
Begin VB.CommandButton Cmd_Del
Caption = "删 除"
Height = 400
Left = 2640
MouseIcon = "AitemMan.frx":2AAC
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 8
Top = 3120
Width = 1300
End
Begin VB.CommandButton Cmd_Close
Caption = "关 闭"
Height = 400
Left = 4080
MouseIcon = "AitemMan.frx":2DB6
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 7
Top = 3120
Width = 1300
End
Begin VB.CommandButton Cmd_Modi
Caption = "修 改"
Height = 400
Left = 4080
MouseIcon = "AitemMan.frx":30C0
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 6
Top = 2400
Width = 1300
End
Begin VB.Frame Frame1
ClipControls = 0 'False
Height = 1935
Left = 2640
TabIndex = 1
Top = 240
Width = 2775
Begin VB.TextBox txtItem
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 1200
MaxLength = 50
TabIndex = 10
Top = 360
Width = 1335
End
Begin VB.TextBox txtPrice
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 1200
MaxLength = 50
TabIndex = 2
Top = 840
Width = 1335
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 = 420
Width = 720
End
Begin VB.Label lblinput_time
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "lblinput_time"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 180
Left = 1200
TabIndex = 5
Top = 1350
Width = 1170
End
Begin VB.Label Label10
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 = 4
Top = 1350
Width = 720
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 = 240
TabIndex = 3
Top = 900
Width = 720
End
End
Begin VB.ListBox List1
Height = 3300
Left = 240
TabIndex = 0
Top = 240
Width = 2175
End
End
Attribute VB_Name = "AitemMan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public OriAid As Long
Dim TmpId As Long
Private Sub Loaditem()
Dim i As Integer
List1.Clear
MyAitem.LoadItem_ByAmuse (OriAid)
i = 0
Do While ArrItem(i) <> ""
List1.AddItem ArrItem(i)
i = i + 1
Loop
End Sub
Private Sub Cmd_Add_Click()
If Trim(txtItem) = "" Then
MsgBox "请输入娱乐项目名称"
Exit Sub
End If
If MyAitem.In_DB(OriAid, txtItem) = True Then
MsgBox Trim(txtItem) + "已在数据库中"
Exit Sub
End If
MyAitem.Aid = OriAid
MyAitem.Item = MakeStr(txtItem)
MyAitem.Price = Val(txtPrice)
MyAitem.Insert
List1.AddItem Trim(txtItem)
Loaditem
End Sub
Private Sub Cmd_Close_Click()
Unload Me
End Sub
Private Sub Cmd_Del_Click()
If List1.ListIndex = -1 Then
MsgBox "请选择项目名称"
Exit Sub
End If
If Mylamuse.AitemInLine(TmpId) > 0 Then
MsgBox "当前娱乐项目在线路中使用,不能删除"
Exit Sub
End If
If MsgBox("是否要删除当前娱乐项目?", vbYesNo, "请确认") = vbYes Then
MyAitem.Delete (TmpId)
txtItem = ""
txtPrice = ""
lblinput_time = ""
List1.RemoveItem List1.ListIndex
End If
End Sub
Private Sub Cmd_Modi_Click()
If List1.ListIndex = -1 Then
MsgBox "请选择项目名称"
Exit Sub
End If
If Trim(txtItem) = "" Then
MsgBox "请输入娱乐项目名称"
Exit Sub
End If
If List1.Text <> Trim(txtItem) Then
If MyAitem.In_DB(OriAid, txtItem) = True Then
MsgBox Trim(txtItem) + "已存在"
Exit Sub
End If
End If
MyAitem.Aid = OriAid
MyAitem.Item = MakeStr(txtItem)
MyAitem.Price = Val(txtPrice)
MyAitem.Update (TmpId)
List1.List(List1.ListIndex) = Trim(txtItem)
End Sub
Private Sub Form_Load()
lblinput_time = ""
Loaditem
End Sub
Private Sub List1_click()
If List1.Text = "" Then
Exit Sub
End If
txtItem = List1.Text
TmpId = MyAitem.GetId(OriAid, txtItem)
MyAitem.GetInfo (TmpId)
txtPrice = MyAitem.Price
lblinput_time = MyAitem.Input_time
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -