📄 frmlineman.frm
字号:
VERSION 5.00
Begin VB.Form FrmLineMan
BorderStyle = 1 'Fixed Single
Caption = "旅游线路管理"
ClientHeight = 3750
ClientLeft = 45
ClientTop = 330
ClientWidth = 5070
Icon = "FrmLineMan.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 = "FrmLineMan.frx":0442
Left = 1440
List = "FrmLineMan.frx":044F
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 = "FrmLineMan.frx":0465
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 3
Top = 3120
Width = 945
End
Begin VB.CommandButton Cmd_Modi
Caption = "查阅修改"
Height = 400
Left = 1475
MouseIcon = "FrmLineMan.frx":076F
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 2
Top = 3120
Width = 945
End
Begin VB.CommandButton Cmd_Del
Caption = "删 除"
Height = 400
Left = 2650
MouseIcon = "FrmLineMan.frx":0A79
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 = "FrmLineMan.frx":0D83
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 0
Top = 3120
Width = 945
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "地域选择"
Height = 255
Left = 240
TabIndex = 7
Top = 263
Width = 855
End
End
Attribute VB_Name = "FrmLineMan"
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)
'根据地域编号TmpId,读取指定地域的所有线路
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
FrmLineEdit.Modify = False
FrmLineEdit.ComboType.ListIndex = 0
FrmLineEdit.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)
FrmLineEdit.Modify = True
FrmLineEdit.txtName = MyLine.lname
FrmLineEdit.ComboType.ListIndex = MyLine.ltype - 1
FrmLineEdit.txtDays = MyLine.lday
FrmLineEdit.txtInsCom = MyLine.insCom
FrmLineEdit.txtInsFee = MyLine.insFee
FrmLineEdit.txtOthers = MyLine.otherCost
FrmLineEdit.txtTour = MyLine.tourPay
FrmLineEdit.txtBenefit = MyLine.benefit
FrmLineEdit.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 + -