⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmlineedit.frm

📁 本系统包括用户管理
💻 FRM
📖 第 1 页 / 共 5 页
字号:
      End
      Begin VB.Label lblTrafAmt 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "0"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   225
         Left            =   5280
         TabIndex        =   63
         Top             =   480
         Width           =   105
      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            =   3600
         TabIndex        =   62
         Top             =   495
         Width           =   1080
      End
      Begin VB.Label lblprice2 
         AutoSize        =   -1  'True
         Caption         =   "车票价格"
         Height          =   180
         Left            =   4680
         TabIndex        =   48
         Top             =   1440
         Width           =   720
      End
      Begin VB.Label lblprice1 
         AutoSize        =   -1  'True
         Caption         =   "车票价格"
         Height          =   180
         Left            =   4680
         TabIndex        =   47
         Top             =   1080
         Width           =   720
      End
      Begin VB.Label lblstation2 
         AutoSize        =   -1  'True
         Caption         =   "车票类型"
         Height          =   180
         Left            =   2040
         TabIndex        =   46
         Top             =   1440
         Width           =   720
      End
      Begin VB.Label lblstation1 
         AutoSize        =   -1  'True
         Caption         =   "车票类型"
         Height          =   180
         Left            =   2040
         TabIndex        =   45
         Top             =   1080
         Width           =   720
      End
   End
   Begin VB.Frame Frame6 
      BackColor       =   &H80000004&
      Height          =   975
      Left            =   240
      TabIndex        =   1
      Top             =   120
      Width           =   11055
      Begin VB.TextBox txtInsFee 
         Alignment       =   1  'Right Justify
         Height          =   300
         Left            =   10200
         MaxLength       =   10
         TabIndex        =   26
         Text            =   "0"
         Top             =   540
         Width           =   735
      End
      Begin VB.TextBox txtInsCom 
         Alignment       =   1  'Right Justify
         Height          =   270
         Left            =   6720
         TabIndex        =   25
         Top             =   555
         Width           =   1815
      End
      Begin VB.TextBox txtDays 
         Alignment       =   1  'Right Justify
         Height          =   270
         Left            =   4320
         MaxLength       =   4
         TabIndex        =   4
         Text            =   "1"
         Top             =   555
         Width           =   855
      End
      Begin VB.TextBox txtName 
         Height          =   270
         Left            =   1320
         MaxLength       =   125
         TabIndex        =   3
         Top             =   195
         Width           =   9615
      End
      Begin VB.ComboBox ComboType 
         Height          =   300
         ItemData        =   "FrmLineEdit.frx":3260
         Left            =   1320
         List            =   "FrmLineEdit.frx":326A
         Style           =   2  'Dropdown List
         TabIndex        =   2
         Top             =   540
         Width           =   1335
      End
      Begin VB.Label Label17 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "保险金额"
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   9240
         TabIndex        =   27
         Top             =   600
         Width           =   720
      End
      Begin VB.Label Label13 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "保险公司"
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   5760
         TabIndex        =   24
         Top             =   600
         Width           =   720
      End
      Begin VB.Label Label24 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "旅游线路"
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   120
         TabIndex        =   7
         Top             =   240
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "行程天数"
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   3240
         TabIndex        =   6
         Top             =   600
         Width           =   720
      End
      Begin VB.Label Label16 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "团队类别"
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   120
         TabIndex        =   5
         Top             =   600
         Width           =   720
      End
   End
End
Attribute VB_Name = "FrmLineEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean

Public Function Check() As Boolean
  With MyLine
  '检查线路名称
  If Len(Trim(txtName)) = 0 Then
    MsgBox "请输入线路名称"
    txtName.SetFocus
    Check = False
    Exit Function
  End If

  '检查行程天数
  If Val(txtDays) <= 0 Then
    MsgBox "请输入行程天数"
    txtDays.SetFocus
    txtDays.SelStart = 0
    txtDays.SelLength = Len(Trim(txtDays))
    Check = False
    Exit Function
  End If
    
  '检查团队类别
  If ComboType.ListIndex < 0 Then
    MsgBox "请设置团队类别"
    ComboType.SetFocus
    Check = False
    Exit Function
  End If

  '检查保险
  If Val(txtInsFee) < 0 Then
    MsgBox "保险费应大于0"
    txtInsFee.SetFocus
    txtInsFee.SelStart = 0
    txtInsFee.SelLength = Len(Trim(txtInsFee))
    Check = False
    Exit Function
  End If

  End With
  Check = True
End Function

Private Sub Refresh_lplace()
  If ComboType.ListIndex = 0 Then '学生线路
    Adodc1.RecordSource = "SELECT a.AreaName As 所在地域, p.Pname As 景点名称," _
            + " p.Child_Price As 票价 FROM Place p, lplace l, Area a WHERE l.lid=" _
            + Trim(MyLine.lid) + " And l.pid=p.pid And a.AreaId=p.AreaId"
  Else                            '成人线路
    Adodc1.RecordSource = "SELECT a.AreaName As 所在地域, p.pName As 景点名称," _
            + " p.Adult_Price As 票价 FROM Place p, lplace l, Area a WHERE l.lid=" _
            + Trim(MyLine.lid) + " And l.pid=p.pid And a.AreaId=p.AreaId"
  End If
  
  Adodc1.Refresh
  SetPlaceAmt
End Sub

Private Sub Refresh_lhotel()
  Adodc2.RecordSource = "SELECT a.AreaName As 所在地域, h.Hname As 宾馆名称," _
            + " '经济间' As 房间类型, l.rdays As 住宿天数, h.Price1 * l.rdays As 价格" _
            + " FROM Hotel h, lhotel l, Area a WHERE l.lid=" + Trim(MyLine.lid) _
            + " And l.hid=h.hid And h.AreaId=a.AreaId And l.rType=1 UNION" _
            + " SELECT a.AreaName As 所在地域, h.Hname As 宾馆名称, '双人间' As 房间类型," _
            + " l.rdays As 住宿天数, h.Price2 * l.rdays As 价格" _
            + " FROM Hotel h, lhotel l, Area a WHERE l.lid=" + Trim(MyLine.lid) _
            + " And l.hid=h.hid And h.AreaId=a.AreaId And l.rType=2 UNION" _
            + " SELECT a.AreaName As 所在地域, h.Hname As 宾馆名称, '三人间' As 房间类型," _
            + " l.rdays As 住宿天数, h.Price3 * l.rdays As 价格" _
            + " FROM Hotel h, lhotel l, Area a WHERE l.lid=" + Trim(MyLine.lid) _
            + " And l.hid=h.hid And h.AreaId=a.AreaId And l.rType=3 UNION" _
            + " SELECT a.AreaName As 所在地域, h.Hname As 宾馆名称, '四人间' As 房间类型," _
            + " l.rdays As 住宿天数, h.Price4 * l.rdays As 价格" _
            + " FROM Hotel h, lhotel l, Area a WHERE l.lid=" + Trim(MyLine.lid) _
            + " And l.hid=h.hid And h.AreaId=a.AreaId And l.rType=4"

  Adodc2.Refresh
  SetHotelAmt
End Sub

Private Sub Refresh_lres()
  Adodc3.RecordSource = "SELECT a.AreaName As 所在地域, r.Rname As 餐厅名称," _
            + " '早餐' As 用餐类型, l.rTimes As 用餐次数, r.Breakfast * l.rTimes As 价格" _
            + " FROM Restaurant r, lres l, Area a WHERE l.lid=" + Trim(MyLine.lid) _
            + " And l.rid=r.rid And r.AreaId=a.AreaId And l.rType=1 UNION" _
            + " SELECT a.AreaName As 所在地域, r.Rname As 餐厅名称, '正餐' As 用餐类型," _
            + " l.rTimes As 用餐次数, r.Dinner * l.rTimes As 价格" _
            + " FROM Restaurant r, lres l, Area a WHERE l.lid=" + Trim(MyLine.lid) _
            + " And l.rid=r.rid And r.AreaId=a.AreaId And l.rType=2"

  Adodc3.Refresh
  SetresAmt
End Sub

Private Sub Refresh_lamuse()
  Adodc4.RecordSource = "SELECT a1.AreaName As 所在地域, a.Aname As 娱乐厅名称," _
            + " i.Item As 娱乐项目, l.aTimes As 娱乐次数, i.Price * l.aTimes As 价格" _
            + " FROM Amusement a, AmuseItem i, lamuse l, Area a1 WHERE l.lid=" _
            + Trim(MyLine.lid) + " And l.Iid=i.Iid And i.aid=a.aid And a.AreaId=a1.AreaId"

  Adodc4.Refresh
  SetAmuseAmt
End Sub

Private Sub Load_traffic(ByVal TmpFlag As Integer)
  If TmpFlag = 1 Then  '往程交通信息
    '读取线路火车信息
    Call Myltrain.GetInfo(MyLine.lid, 1)
    '如果Myltrain.Tid<>0,则存在表示往程火车信息
    If Myltrain.Tid <> 0 Then
      ComboTraf1.ListIndex = 0
      '读取火车信息
      MyTrain.GetInfo (Myltrain.Tid)
      '显示起止车站
      lblstation1 = MyTrain.Sstation + " - " + MyTrain.Estation
      '显示车票类型和票价
      Select Case Myltrain.tType
        Case 1
          lbltype1 = "硬座"
          lblprice1 = MyTrain.PriceYz
        Case 2
          lbltype1 = "软座"
          lblprice1 = MyTrain.PriceRz
        Case 3
          lbltype1 = "硬卧"
          lblprice1 = MyTrain.PriceYw
        Case 4
          lbltype1 = "软卧"
          lblprice1 = MyTrain.PriceRw
      End Select
    Else
      '读取线路飞机信息
      Call Mylplane.GetInfo(MyLine.lid, 1)
      If Mylplane.Pid <> 0 Then
        ComboTraf1.ListIndex = 1
        '读取飞机信息
        MyPlane.GetInfo (Mylplane.Pid)
        '显示起止机场
        lblstation1 = MyPlane.Sairport + " - " + MyPlane.Eairport
        lbltype1 = ""
        '显示机票价格
        lblprice1 = MyPlane.Price2
      Else
        '如果即没有线路火车信息,也没有线路飞机信息,则表示没有线路交通信息
        ComboTraf1.ListIndex = -1
        lblstation1 = ""
        lbltype1 = ""
        lblprice1 = ""
      End If
    End If
  Else    '处理返程线路交通信息,情况与回程相似
    Call Myltrain.GetInfo(MyLine.lid, 2)
    If Myltrain.Tid <> 0 Then
      ComboTraf2.ListIndex = 0
      '读取火车票价
      MyTrain.GetInfo (Myltrain.Tid)
      
      lblstation2 = MyTrain.Sstation + " - " + MyTrain.Estation
      Select Case Myltrain.tType
        Case 1
          lbltype2 = "硬座"
          lblprice2 = MyTrain.PriceYz
        Case 2
          lbltype2 = "软座"
          lblprice2 = MyTrain.PriceRz
        Case 3
          lbltype2 = "硬卧"
          lblprice2 = MyTrain.PriceYw
        Case 4
          lbltype2 = "软卧"
          lblprice2 = MyTrain.PriceRw
      End Select
    Else
      '飞机
      Call Mylplane.GetInfo(MyLine.lid, 2)
      If Mylplane.Pid <> 0 Then
        ComboTraf2.ListIndex = 1
        MyPlane.GetInfo (Mylplane.Pid)
        '读取飞机票价
        lblstation2 = MyPlane.Sairport + " - " + MyPlane.Eairport
        lbltype2 = ""
        lblprice2 = MyPlane.Price2

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -