📄 frmlplaneedit.frm
字号:
VERSION 5.00
Begin VB.Form FrmlplaneEdit
BorderStyle = 1 'Fixed Single
Caption = "编辑线路飞机信息"
ClientHeight = 2625
ClientLeft = 45
ClientTop = 330
ClientWidth = 4815
Icon = "FrmlplaneEdit.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2625
ScaleWidth = 4815
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Height = 1695
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 = 1200
MaxLength = 10
TabIndex = 6
Text = "0"
Top = 1200
Width = 735
End
Begin VB.ComboBox ComboPno
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
ItemData = "FrmlplaneEdit.frx":0442
Left = 1200
List = "FrmlplaneEdit.frx":044F
Style = 2 'Dropdown List
TabIndex = 5
Top = 255
Width = 2895
End
Begin VB.TextBox txtSairport
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 = 1200
MaxLength = 10
TabIndex = 4
Top = 705
Width = 735
End
Begin VB.TextBox txtEairport
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 = 3360
MaxLength = 10
TabIndex = 3
Top = 705
Width = 735
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 = 10
Top = 1260
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 = 9
Top = 765
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 = 8
Top = 315
Width = 720
End
Begin VB.Label Label5
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 = 7
Top = 765
Width = 720
End
End
Begin VB.CommandButton Cmd_Ok
Caption = "确 定"
Default = -1 'True
Height = 400
Left = 842
MouseIcon = "FrmlplaneEdit.frx":0465
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 1
Top = 2040
Width = 1300
End
Begin VB.CommandButton Cmd_Cancel
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 2672
MouseIcon = "FrmlplaneEdit.frx":076F
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 0
Top = 2040
Width = 1300
End
End
Attribute VB_Name = "FrmlplaneEdit"
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 OriPno As String
Private Function SetPrice()
Dim TmpId As Long
TmpId = MyPlane.GetId(ComboPno.Text, MakeStr(txtSairport), MakeStr(txtEairport))
MyPlane.GetInfo (TmpId)
txtPrice = MyPlane.Price2
End Function
Private Function Check() As Boolean
If Trim(ComboPno.Text) = "" Then
MsgBox "请选择航班"
Check = False
Exit Function
End If
If Trim(txtSairport) = "" Then
MsgBox "请选择起飞机场"
Check = False
Exit Function
End If
If Trim(txtEairport) = "" Then
MsgBox "请选择抵达机场"
Check = False
Exit Function
End If
Check = True
End Function
Private Sub Load_Pno()
Dim TmpId As Long
Dim i As Integer
ComboPno.Clear
Call MyPlane.LoadPno(MakeStr(txtSairport), MakeStr(txtEairport))
i = 0
Do While ArrPno(i) <> ""
ComboPno.AddItem ArrPno(i)
i = i + 1
Loop
End Sub
Private Sub Cmd_OK_Click()
If Check = False Then
Exit Sub
End If
With Mylplane
.lid = MyLine.lid
If FrmLineEdit.Option1.Value = True Then
.direct = 1
Else
.direct = 2
End If
.Pid = MyPlane.GetId(ComboPno.Text, MakeStr(txtSairport), MakeStr(txtEairport))
Call .Delete(.lid, .direct)
.Insert
End With
Unload Me
End Sub
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub ComboPno_Click()
'计算报价
SetPrice
End Sub
Private Sub Form_Load()
'装入航班数据
Load_Pno
If Modify = False Then
If ComboPno.ListCount > 0 Then
ComboPno.ListIndex = 0
End If
'计算报价
SetPrice
Else
If InCombo(OriPno, ComboPno) = True Then
ComboPno.Text = OriPno
End If
'计算报价
SetPrice
End If
End Sub
Private Sub txtEairport_Change()
'装入航班信息
Load_Pno
If ComboPno.ListCount > 0 Then
ComboPno.ListIndex = 0
End If
'计算票价
SetPrice
End Sub
Private Sub txtSairport_Change()
'装入航班信息
Load_Pno
If ComboPno.ListCount > 0 Then
ComboPno.ListIndex = 0
End If
'计算票价
SetPrice
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -