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

📄 frmlresedit.frm

📁 本系统本系统采用VB6.0+SQL2000,紧扣旅游的关键要素,进述如何对这些旅游资源进行管理,具有很强的实用性,既可以作为独立的系统使用,也可以作为旅游企业综合业务管理系统的一个重要组成部分,本系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmlresEdit 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "编辑线路用餐信息"
   ClientHeight    =   3090
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4800
   Icon            =   "FrmlresEdit.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3090
   ScaleWidth      =   4800
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Cmd_Cancel 
      Cancel          =   -1  'True
      Caption         =   "取 消"
      Height          =   400
      Left            =   2670
      MouseIcon       =   "FrmlresEdit.frx":0442
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   13
      Top             =   2520
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Ok 
      Caption         =   "确 定"
      Default         =   -1  'True
      Height          =   400
      Left            =   840
      MouseIcon       =   "FrmlresEdit.frx":074C
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   12
      Top             =   2520
      Width           =   1300
   End
   Begin VB.Frame Frame1 
      Height          =   2175
      Left            =   240
      TabIndex        =   0
      Top             =   120
      Width           =   4335
      Begin VB.ComboBox ComboRes 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Left            =   1320
         Style           =   2  'Dropdown List
         TabIndex        =   6
         Top             =   710
         Width           =   2775
      End
      Begin VB.ComboBox ComboType 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         ItemData        =   "FrmlresEdit.frx":0A56
         Left            =   1320
         List            =   "FrmlresEdit.frx":0A63
         Style           =   2  'Dropdown List
         TabIndex        =   5
         Top             =   255
         Width           =   975
      End
      Begin VB.ComboBox ComboName 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Left            =   2400
         Style           =   2  'Dropdown List
         TabIndex        =   4
         Top             =   255
         Width           =   1695
      End
      Begin VB.TextBox txtRtimes 
         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            =   1320
         MaxLength       =   10
         TabIndex        =   3
         Text            =   "0"
         Top             =   1643
         Width           =   735
      End
      Begin VB.ComboBox ComboRtype 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         ItemData        =   "FrmlresEdit.frx":0A79
         Left            =   1320
         List            =   "FrmlresEdit.frx":0A83
         Style           =   2  'Dropdown List
         TabIndex        =   2
         Top             =   1200
         Width           =   975
      End
      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            =   3360
         MaxLength       =   10
         TabIndex        =   1
         Text            =   "0"
         Top             =   1643
         Width           =   735
      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        =   11
         Top             =   315
         Width           =   720
      End
      Begin VB.Label Label6 
         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             =   1710
         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             =   770
         Width           =   720
      End
      Begin VB.Label Label2 
         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             =   1260
         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            =   2400
         TabIndex        =   7
         Top             =   1710
         Width           =   720
      End
   End
End
Attribute VB_Name = "FrmlresEdit"
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 OriAreaName, OriRes As String
Public OriType, OriRtype As Integer

Private Function SetPrice()
  Dim TmpId As Long
  
  TmpId = MyRes.GetId(ComboRes.Text)
  MyRes.GetInfo (TmpId)
  Select Case ComboRtype.ListIndex
    Case 0
      txtPrice = MyRes.Breakfast * Val(txtRtimes)
    Case 1
      txtPrice = MyRes.Dinner * Val(txtRtimes)
  End Select
End Function

Private Function Check() As Boolean
  If Trim(ComboName) = "" Then
    MsgBox "请选择地域名称"
    Check = False
    Exit Function
  End If
  If Trim(ComboRes) = "" Then
    MsgBox "请选择餐厅名称"
    Check = False
    Exit Function
  End If
  
  Check = True
End Function

Private Sub Load_Res()
  Dim TmpId As Long
  Dim i As Integer
  
  ComboRes.Clear
  TmpId = MyArea.GetId(ComboName.Text)
  MyRes.LoadRestaurant_ByArea (TmpId)
  i = 0
  Do While ArrRes(i) <> ""
    ComboRes.AddItem ArrRes(i)
    i = i + 1
  Loop
End Sub

Private Sub Cmd_OK_Click()
  If Check = False Then
    Exit Sub
  End If
  
  With Mylres
  .lid = MyLine.lid
  .rid = MyRes.GetId(ComboRes.Text)
  .rType = ComboRtype.ListIndex + 1
  .rTimes = Val(txtRtimes)
  
  '判断餐厅名称是否存在
  If Modify = False Or OriRes <> Trim(ComboRes) Then
    If .In_DB(.lid, .rid, .rType) = True Then
      MsgBox "当前餐厅已经存在,请重新输入"
      Exit Sub
    End If
  End If
  
  If Modify = False Then
    .Insert
  Else
    Call .Update(MyLine.lid, OriId, OriRtype)
  End If
    
  End With
  Unload Me
End Sub

Private Sub Cmd_Cancel_Click()
  Unload Me
End Sub

Private Sub ComboName_Click()
  '装入餐厅数据
  Load_Res
  If ComboRes.ListCount > 0 Then
    ComboRes.ListIndex = 0
  End If
  '计算报价
  SetPrice
End Sub

Private Sub ComboRes_Click()
  '计算报价
  SetPrice
End Sub

Private Sub ComboRtype_Click()
  '计算报价
  SetPrice
End Sub

Private Sub ComboType_Click()
  '装入地域数据
  Call Loadarea(ComboType.ListIndex + 1, ComboName)
  If ComboName.ListCount > 0 Then
    ComboName.ListIndex = 0
  End If
  '装入餐厅数据
  Load_Res
  If ComboRes.ListCount > 0 Then
    ComboRes.ListIndex = 0
  End If
  '计算报价
  SetPrice
End Sub

Private Sub Form_Load()
  If Modify = False Then
    ComboType.ListIndex = 0
    Call Loadarea(1, ComboName)
    If ComboName.ListCount > 0 Then
      ComboName.ListIndex = 0
    End If
    '装入餐厅数据
    Load_Res
    If ComboRes.ListCount > 0 Then
      ComboRes.ListIndex = 0
    End If
    '计算报价
    SetPrice
  Else
    ComboType.ListIndex = OriType - 1
    Call Loadarea(OriType, ComboName)
    If InCombo(OriAreaName, ComboName) = True Then
      ComboName.Text = OriAreaName
    End If
    '装入餐厅数据
    Load_Res
    If InCombo(OriRes, ComboRes) = True Then
      ComboRes.Text = OriRes
    End If
    '计算报价
    SetPrice
  End If
End Sub

Private Sub txtRtimes_KeyPress(KeyAscii As Integer)
  If In_Int(KeyAscii) = False Then
    KeyAscii = 0
  End If
End Sub

Private Sub txtRtimes_Change()
  SetPrice
End Sub

⌨️ 快捷键说明

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