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

📄 frmareaedit.frm

📁 本系统本系统采用VB6.0+SQL2000,紧扣旅游的关键要素,进述如何对这些旅游资源进行管理,具有很强的实用性,既可以作为独立的系统使用,也可以作为旅游企业综合业务管理系统的一个重要组成部分,本系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmAreaEdit 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "编辑地域信息"
   ClientHeight    =   2265
   ClientLeft      =   45
   ClientTop       =   345
   ClientWidth     =   3735
   Icon            =   "FrmAreaEdit.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2265
   ScaleWidth      =   3735
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      Height          =   1335
      Left            =   240
      TabIndex        =   2
      Top             =   120
      Width           =   3255
      Begin VB.TextBox txtAreaName 
         Height          =   270
         Left            =   1200
         MaxLength       =   100
         TabIndex        =   3
         Top             =   795
         Width           =   1815
      End
      Begin VB.Label lblAreaType 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "lblAreaType"
         Height          =   180
         Left            =   1200
         TabIndex        =   6
         Top             =   360
         Width           =   990
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "地域类型"
         Height          =   180
         Left            =   240
         TabIndex        =   5
         Top             =   360
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "地域名称"
         Height          =   180
         Left            =   240
         TabIndex        =   4
         Top             =   840
         Width           =   720
      End
   End
   Begin VB.CommandButton Cmd_OK 
      Caption         =   "确 定"
      Height          =   400
      Left            =   415
      MouseIcon       =   "FrmAreaEdit.frx":0442
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   1680
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Cancel 
      Cancel          =   -1  'True
      Caption         =   "取 消"
      Height          =   400
      Left            =   2020
      MouseIcon       =   "FrmAreaEdit.frx":074C
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   1680
      Width           =   1300
   End
End
Attribute VB_Name = "FrmAreaEdit"
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 As String
Public CurType As Integer

Private Function Check() As Boolean
  If Trim(txtAreaName) = "" Then
    MsgBox "请输入地域名称"
    txtAreaName.SetFocus
    Check = False
    Exit Function
  End If
  
  Check = True
End Function

Private Sub Cmd_OK_Click()
  '检查用户输入的地域数据是否有效
  If Check = False Then
    Exit Sub
  End If
  
  With MyArea
  '把用户输入的地域数据赋值到MyArea对象的成员变量中
  .AreaName = MakeStr(txtAreaName)
  .AreaType = CurType
  '判断地域名称是否存在
  If Modify = False Or OriAreaName <> Trim(txtAreaName) Then
    If .In_DB(MakeStr(txtAreaName)) = True Then
      MsgBox "地域名称已经存在,请重新输入"
      txtAreaName.SetFocus
      txtAreaName.SelStart = 0
      txtAreaName.SelLength = Len(txtAreaName)
      Exit Sub
    End If
  End If
  '根据变量Modify的值,决定是插入新数据,还是修改已有的数据
  If Modify = False Then
    .Insert
  Else
    .Update (OriId)
  End If
  End With
  '关闭窗体
  Unload Me
End Sub

Private Sub Cmd_Cancel_Click()
  Unload Me
End Sub

Private Sub txtAreaName_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub


⌨️ 快捷键说明

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