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

📄 lhoteledit.frm

📁 目录:图书管理系统软件设计说明 一.可行性研究 二.需求分析:1.任务概述2.数据需求:2.3 数据库描述:2.4 数据采集: 3.功能需求:新书入库DFD:图书借阅的DFD:过期提示的DFD:借阅查
💻 FRM
字号:
VERSION 5.00
Begin VB.Form lhotelEdit 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "编辑线路酒店信息"
   ClientHeight    =   3105
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4800
   Icon            =   "lhotelEdit.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3105
   ScaleWidth      =   4800
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      Height          =   2175
      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            =   3360
         MaxLength       =   10
         TabIndex        =   12
         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        =   "lhotelEdit.frx":27A2
         Left            =   1320
         List            =   "lhotelEdit.frx":27B2
         Style           =   2  'Dropdown List
         TabIndex        =   10
         Top             =   1200
         Width           =   2775
      End
      Begin VB.TextBox txtRdays 
         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        =   6
         Text            =   "0"
         Top             =   1643
         Width           =   735
      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        =   5
         Top             =   255
         Width           =   1695
      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        =   "lhotelEdit.frx":27D6
         Left            =   1320
         List            =   "lhotelEdit.frx":27E3
         Style           =   2  'Dropdown List
         TabIndex        =   4
         Top             =   255
         Width           =   975
      End
      Begin VB.ComboBox ComboHotel 
         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        =   3
         Top             =   710
         Width           =   2775
      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        =   13
         Top             =   1710
         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        =   11
         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             =   770
         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        =   8
         Top             =   1710
         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        =   7
         Top             =   315
         Width           =   900
      End
   End
   Begin VB.CommandButton Cmd_Ok 
      Caption         =   "确 定"
      Default         =   -1  'True
      Height          =   400
      Left            =   840
      MouseIcon       =   "lhotelEdit.frx":27F9
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   2520
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Cancel 
      Cancel          =   -1  'True
      Caption         =   "取 消"
      Height          =   400
      Left            =   2670
      MouseIcon       =   "lhotelEdit.frx":2B03
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   2520
      Width           =   1300
   End
End
Attribute VB_Name = "lhotelEdit"
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, OriHotel As String
Public OriType, OriRtype As Integer

Private Function SetPrice()
  Dim TmpId As Long
  
  TmpId = MyHotel.GetId(ComboHotel.Text)
  MyHotel.GetInfo (TmpId)
  Select Case ComboRtype.ListIndex
    Case 0
      txtPrice = MyHotel.Price1 * Val(txtRdays)
    Case 1
      txtPrice = MyHotel.Price2 * Val(txtRdays)
    Case 2
      txtPrice = MyHotel.Price3 * Val(txtRdays)
    Case 3
      txtPrice = MyHotel.Price4 * Val(txtRdays)
  End Select
End Function

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

Private Sub Load_Hotel()
  Dim TmpId As Long
  Dim i As Integer
  
  ComboHotel.Clear
  TmpId = MyArea.GetId(ComboName.Text)
  MyHotel.LoadHotel_ByArea (TmpId)
  i = 0
  Do While ArrHotel(i) <> ""
    ComboHotel.AddItem ArrHotel(i)
    i = i + 1
  Loop
End Sub

Private Sub Cmd_OK_Click()
  If Check = False Then
    Exit Sub
  End If
  
  With Mylhotel
  .lid = MyLine.lid
  .hid = MyHotel.GetId(ComboHotel.Text)
  .rType = ComboRtype.ListIndex + 1
  .rdays = Val(txtRdays)
  If Modify = False Or OriHotel <> Trim(ComboHotel) Then
    If .In_DB(.lid, .hid, .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_Hotel
  If ComboHotel.ListCount > 0 Then
    ComboHotel.ListIndex = 0
  End If
  SetPrice
End Sub

Private Sub ComboHotel_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_Hotel
  If ComboHotel.ListCount > 0 Then
    ComboHotel.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_Hotel
    If ComboHotel.ListCount > 0 Then
      ComboHotel.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_Hotel
    If InCombo(OriHotel, ComboHotel) = True Then
      ComboHotel.Text = OriHotel
    End If
    SetPrice
  End If
End Sub

Private Sub txtRdays_Change()
  SetPrice
End Sub

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

⌨️ 快捷键说明

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