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

📄 frmaitemman.frm

📁 本系统本系统采用VB6.0+SQL2000,紧扣旅游的关键要素,进述如何对这些旅游资源进行管理,具有很强的实用性,既可以作为独立的系统使用,也可以作为旅游企业综合业务管理系统的一个重要组成部分,本系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmAitemMan 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "娱乐项目管理"
   ClientHeight    =   3840
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5655
   Icon            =   "FrmAitemMan.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3840
   ScaleWidth      =   5655
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Cmd_Add 
      Caption         =   "添 加"
      Default         =   -1  'True
      Height          =   400
      Left            =   2640
      MouseIcon       =   "FrmAitemMan.frx":0442
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   9
      Top             =   2400
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Del 
      Caption         =   "删 除"
      Height          =   400
      Left            =   2640
      MouseIcon       =   "FrmAitemMan.frx":074C
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   8
      Top             =   3120
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Close 
      Caption         =   "关 闭"
      Height          =   400
      Left            =   4080
      MouseIcon       =   "FrmAitemMan.frx":0A56
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   7
      Top             =   3120
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Modi 
      Caption         =   "修 改"
      Height          =   400
      Left            =   4080
      MouseIcon       =   "FrmAitemMan.frx":0D60
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   6
      Top             =   2400
      Width           =   1300
   End
   Begin VB.Frame Frame1 
      ClipControls    =   0   'False
      Height          =   1935
      Left            =   2640
      TabIndex        =   1
      Top             =   240
      Width           =   2775
      Begin VB.TextBox txtItem 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Left            =   1200
         MaxLength       =   50
         TabIndex        =   10
         Top             =   360
         Width           =   1335
      End
      Begin VB.TextBox txtPrice 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Left            =   1200
         MaxLength       =   50
         TabIndex        =   2
         Top             =   840
         Width           =   1335
      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        =   11
         Top             =   420
         Width           =   720
      End
      Begin VB.Label lblinput_time 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "lblinput_time"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   1200
         TabIndex        =   5
         Top             =   1350
         Width           =   1170
      End
      Begin VB.Label Label10 
         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             =   1350
         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            =   240
         TabIndex        =   3
         Top             =   900
         Width           =   720
      End
   End
   Begin VB.ListBox List1 
      Height          =   3300
      Left            =   240
      TabIndex        =   0
      Top             =   240
      Width           =   2175
   End
End
Attribute VB_Name = "FrmAitemMan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public OriAid As Long
Dim TmpId As Long

Private Sub Loaditem()
  Dim i As Integer
  '清空娱乐项目列表
  List1.Clear
  '根据当前的娱乐厅编号,读取所有的娱乐项目到数组ArrItem()中
  MyAitem.LoadItem_ByAmuse (OriAid)
  '依次把数组ArrItem()中的数据添加到娱乐项目列表List1中
  i = 0
  Do While ArrItem(i) <> ""
    List1.AddItem ArrItem(i)
    i = i + 1
  Loop
End Sub

Private Sub Cmd_Add_Click()
  '检查娱乐项目名称是否有效
  If Trim(txtItem) = "" Then
    MsgBox "请输入娱乐项目名称"
    Exit Sub
  End If
  '调用MyAitem.In_DB()函数,检查输入的娱乐项目是否已在数据库中
  If MyAitem.In_DB(OriAid, txtItem) = True Then
    MsgBox Trim(txtItem) + "已在数据库中"
    Exit Sub
  End If
  '把用户输入的数据赋值到MyAitem对象的成员变量中,然后调用insert过程插入数据库
  MyAitem.Aid = OriAid
  MyAitem.Item = MakeStr(txtItem)
  MyAitem.Price = Val(txtPrice)
  MyAitem.Insert
  List1.AddItem Trim(txtItem)
  '重新装入娱乐项目
  Loaditem
End Sub

Private Sub Cmd_Close_Click()
  Unload Me
End Sub

Private Sub Cmd_Del_Click()
  If List1.ListIndex = -1 Then
    MsgBox "请选择项目名称"
    Exit Sub
  End If
  
  If Mylamuse.AitemInLine(TmpId) > 0 Then
    MsgBox "当前娱乐项目在线路中使用,不能删除"
    Exit Sub
  End If
  
  If MsgBox("是否要删除当前娱乐项目?", vbYesNo, "请确认") = vbYes Then
    MyAitem.Delete (TmpId)
    txtItem = ""
    txtPrice = ""
    lblinput_time = ""
    List1.RemoveItem List1.ListIndex
  End If
End Sub

Private Sub Cmd_Modi_Click()
  If List1.ListIndex = -1 Then
    MsgBox "请选择项目名称"
    Exit Sub
  End If
  
  '检查娱乐项目名称是否有效
  If Trim(txtItem) = "" Then
    MsgBox "请输入娱乐项目名称"
    Exit Sub
  End If

  '判断地域信息是否存在
  If List1.Text <> Trim(txtItem) Then
    If MyAitem.In_DB(OriAid, txtItem) = True Then
      MsgBox Trim(txtItem) + "已存在"
      Exit Sub
    End If
  End If
  
  MyAitem.Aid = OriAid
  MyAitem.Item = MakeStr(txtItem)
  MyAitem.Price = Val(txtPrice)
  MyAitem.Update (TmpId)
  List1.List(List1.ListIndex) = Trim(txtItem)
End Sub

Private Sub Form_Load()
  lblinput_time = ""
  Loaditem
End Sub

Private Sub List1_click()
  '判断是否选择了娱乐项目
  If List1.Text = "" Then
    Exit Sub
  End If
  '把选择的娱乐项目名称显示在右侧的“娱乐项目”编辑框中
  txtItem = List1.Text
  '读取娱乐项目编号,并根据此编号读取娱乐项目的所有信息
  TmpId = MyAitem.GetId(OriAid, txtItem)
  MyAitem.GetInfo (TmpId)
  '把娱乐项目的价格赋值到txtPrice文本框中
  txtPrice = MyAitem.Price
  '把娱乐项目的编辑时间赋值到lblinput_time标签中
  lblinput_time = MyAitem.Input_time
End Sub

⌨️ 快捷键说明

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