📄 lineman.frm
字号:
VERSION 5.00
Begin VB.Form LineMan
BorderStyle = 1 'Fixed Single
Caption = "旅游线路管理"
ClientHeight = 3750
ClientLeft = 45
ClientTop = 330
ClientWidth = 5070
Icon = "LineMan.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3750
ScaleWidth = 5070
StartUpPosition = 2 '屏幕中心
Begin VB.ComboBox ComboType
Height = 300
ItemData = "LineMan.frx":27A2
Left = 1440
List = "LineMan.frx":27AF
Style = 2 'Dropdown List
TabIndex = 6
Top = 240
Width = 1455
End
Begin VB.ComboBox ComboName
Height = 300
Left = 3240
Style = 2 'Dropdown List
TabIndex = 5
Top = 240
Width = 1575
End
Begin VB.ListBox List1
Height = 2220
Left = 240
TabIndex = 4
Top = 720
Width = 4575
End
Begin VB.CommandButton Cmd_Add
Caption = "新增线路"
Default = -1 'True
Height = 400
Left = 300
MouseIcon = "LineMan.frx":27C5
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 3
Top = 3120
Width = 945
End
Begin VB.CommandButton Cmd_Modi
Caption = "查阅修改"
Height = 400
Left = 1475
MouseIcon = "LineMan.frx":2ACF
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 2
Top = 3120
Width = 945
End
Begin VB.CommandButton Cmd_Del
Caption = "删 除"
Height = 400
Left = 2650
MouseIcon = "LineMan.frx":2DD9
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 1
Top = 3120
Width = 945
End
Begin VB.CommandButton Cmd_Close
Cancel = -1 'True
Caption = "返 回"
Height = 400
Left = 3825
MouseIcon = "LineMan.frx":30E3
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 0
Top = 3120
Width = 945
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "旅游地选择"
Height = 180
Left = 240
TabIndex = 7
Top = 270
Width = 900
End
End
Attribute VB_Name = "LineMan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Curlid As Long
Private Sub Xl_refresh()
Dim i As Integer
Dim TmpId As Long
TmpId = MyArea.GetId(ComboName.Text)
MyLine.Loadline_ByArea (TmpId)
List1.Clear
i = 0
Do While ArrLine(i) <> ""
List1.AddItem ArrLine(i)
i = i + 1
Loop
End Sub
Private Sub ComboType_Click()
Call Loadarea(ComboType.ListIndex + 1, ComboName)
If ComboName.ListCount > 0 Then
ComboName.ListIndex = 0
End If
Xl_refresh
End Sub
Private Sub ComboName_Click()
Xl_refresh
End Sub
Private Sub Cmd_Add_Click()
MyLine.Init
MyLine.AreaId = MyArea.GetId(ComboName.Text)
MyLine.lid = MyLine.Insert
LineEdit.Modify = False
LineEdit.ComboType.ListIndex = 0
LineEdit.Show 1
Xl_refresh
End Sub
Private Sub Cmd_Modi_Click()
If List1.ListIndex < 0 Then
MsgBox "请选择线路"
Exit Sub
End If
MyLine.Init
MyLine.GetInfo (Curlid)
LineEdit.Modify = True
LineEdit.txtName = MyLine.lname
LineEdit.ComboType.ListIndex = MyLine.ltype - 1
LineEdit.txtDays = MyLine.lday
LineEdit.txtInsCom = MyLine.insCom
LineEdit.txtInsFee = MyLine.insFee
LineEdit.txtOthers = MyLine.otherCost
LineEdit.txtTour = MyLine.tourPay
LineEdit.txtBenefit = MyLine.benefit
LineEdit.Show 1
Xl_refresh
End Sub
Private Sub Cmd_Del_Click()
If List1.ListIndex < 0 Then
MsgBox "请选择线路"
Exit Sub
End If
If MsgBox("请确认是否删除", vbYesNo, "请确认") = vbNo Then
Exit Sub
End If
p = List1.ListIndex
MyLine.Delete (Curlid)
Xl_refresh
End Sub
Private Sub Cmd_Close_Click()
Unload Me
End Sub
Private Sub Form_Load()
ComboType.ListIndex = 0
Call Loadarea(1, ComboName)
If ComboName.ListCount > 0 Then
ComboName.ListIndex = 0
End If
Xl_refresh
End Sub
Private Sub List1_click()
Curlid = MyLine.GetId(List1.Text)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -