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

📄 lplaceedit.frm

📁 采用VisualBasic和SQL Server 2000开发 功能比较全面的旅游资源管理系
💻 FRM
字号:
VERSION 5.00
Begin VB.Form lplaceEdit 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "编辑线路景点信息"
   ClientHeight    =   2625
   ClientLeft      =   45
   ClientTop       =   345
   ClientWidth     =   4815
   Icon            =   "lplaceEdit.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2625
   ScaleWidth      =   4815
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Cmd_Cancel 
      Cancel          =   -1  'True
      Caption         =   "取 消"
      Height          =   400
      Left            =   2671
      MouseIcon       =   "lplaceEdit.frx":27A2
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   9
      Top             =   2040
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Ok 
      Caption         =   "确 定"
      Default         =   -1  'True
      Height          =   400
      Left            =   843
      MouseIcon       =   "lplaceEdit.frx":2AAC
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   8
      Top             =   2040
      Width           =   1300
   End
   Begin VB.Frame Frame1 
      Height          =   1695
      Left            =   240
      TabIndex        =   0
      Top             =   120
      Width           =   4335
      Begin VB.ComboBox ComboPlace 
         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        =   10
         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        =   "lplaceEdit.frx":2DB6
         Left            =   1320
         List            =   "lplaceEdit.frx":2DC3
         Style           =   2  'Dropdown List
         TabIndex        =   3
         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        =   2
         Top             =   255
         Width           =   1695
      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            =   1320
         MaxLength       =   10
         TabIndex        =   1
         Text            =   "0"
         Top             =   1158
         Width           =   1935
      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
      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        =   6
         Top             =   1225
         Width           =   720
      End
      Begin VB.Label Label7 
         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        =   5
         Top             =   1225
         Width           =   450
      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        =   4
         Top             =   770
         Width           =   720
      End
   End
End
Attribute VB_Name = "lplaceEdit"
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, OriPlace As String
Public OriType As Integer

Private Function SetPrice()
  Dim TmpId As Long
  TmpId = MyPlace.GetId(ComboPlace.Text)
  MyPlace.GetInfo (TmpId)
  If LineEdit.ComboType.ListIndex = 0 Then
    txtPrice = MyPlace.Child_price
  Else
    txtPrice = MyPlace.Adult_price
  End If
End Function

Private Sub Load_Place()
  Dim TmpId As Long
  Dim i As Integer
  ComboPlace.Clear
  TmpId = MyArea.GetId(ComboName.Text)
  MyPlace.Loadplace_ByArea (TmpId)
  i = 0
  Do While ArrPlace(i) <> ""
    ComboPlace.AddItem ArrPlace(i)
    i = i + 1
  Loop
End Sub

Private Sub Cmd_OK_Click()
  If Trim(ComboName) = "" Then
    MsgBox "请选择地域名称"
    Exit Sub
  End If
  If Trim(ComboPlace) = "" Then
    MsgBox "请选择景点名称"
    Exit Sub
  End If
  With Mylplace
  .lid = MyLine.lid
  .Pid = MyPlace.GetId(ComboPlace.Text)
  If Modify = False Or OriPlaceName <> Trim(ComboPlace) Then
    If .In_DB(.lid, .Pid) = True Then
      MsgBox "当前景点已经存在,请重新输入"
      Exit Sub
    End If
  End If
  If Modify = False Then
    .Insert
  Else
    Call .Update(MyLine.lid, OriId)
  End If
  End With
  Unload Me
End Sub

Private Sub Cmd_Cancel_Click()
  Unload Me
End Sub

Private Sub ComboName_Click()
  Load_Place
  If ComboPlace.ListCount > 0 Then
    ComboPlace.ListIndex = 0
  End If
  SetPrice
End Sub

Private Sub ComboPlace_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_Place
  If ComboPlace.ListCount > 0 Then
    ComboPlace.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_Place
    If ComboPlace.ListCount > 0 Then
      ComboPlace.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_Place
    If InCombo(OriPlace, ComboPlace) = True Then
      ComboPlace.Text = OriPlace
    End If
    SetPrice
  End If
End Sub

⌨️ 快捷键说明

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