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

📄 frminfo.frm

📁 针对于订房中心的酒店合同管理。管理权限有管理员和业务员等。
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmInfo 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "合同信息"
   ClientHeight    =   7695
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   11040
   Icon            =   "frmInfo.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   7695
   ScaleWidth      =   11040
   StartUpPosition =   2  '屏幕中心
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   2040
      Top             =   7800
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.ComboBox Combo2 
      Height          =   300
      Left            =   9120
      TabIndex        =   11
      Text            =   "请选择地区"
      Top             =   240
      Width           =   1695
   End
   Begin VB.CheckBox Check4 
      Caption         =   "地区"
      Height          =   375
      Left            =   8280
      TabIndex        =   10
      Top             =   240
      Width           =   735
   End
   Begin VB.CommandButton Command3 
      Caption         =   "关    闭"
      Height          =   375
      Left            =   7440
      TabIndex        =   9
      Top             =   840
      Width           =   1215
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Height          =   6135
      Left            =   120
      TabIndex        =   8
      Top             =   1440
      Width           =   10815
      _ExtentX        =   19076
      _ExtentY        =   10821
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取    消"
      Height          =   375
      Left            =   4920
      TabIndex        =   7
      Top             =   840
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "查   询"
      Height          =   375
      Left            =   2520
      TabIndex        =   6
      Top             =   840
      Width           =   1215
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   4080
      TabIndex        =   5
      Text            =   "请选择星级"
      Top             =   240
      Width           =   1335
   End
   Begin VB.CheckBox Check2 
      Caption         =   "星级"
      Height          =   375
      Left            =   3360
      TabIndex        =   4
      Top             =   240
      Width           =   735
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   6720
      TabIndex        =   3
      Top             =   240
      Width           =   1335
   End
   Begin VB.CheckBox Check3 
      Caption         =   "合同编号"
      Height          =   375
      Left            =   5640
      TabIndex        =   2
      Top             =   240
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1200
      TabIndex        =   1
      Top             =   240
      Width           =   1935
   End
   Begin VB.CheckBox Check1 
      Caption         =   "酒店名称"
      Height          =   375
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   1215
   End
End
Attribute VB_Name = "frmInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim panduan As String

Private Sub Command1_Click()
Dim rs_findbook As New ADODB.Recordset
Dim conn As New ADODB.Connection
Dim sql As String
If Check1.Value = vbChecked Then
  sql = "酒店名称='" & Trim(Text1.Text & "") & "'"
End If
If Check2.Value = vbChecked Then
  If Trim(sql) = "" Then
    sql = "星级='" & Trim(Combo1.Text & " ") & "'"
  Else
    sql = sql & "and 星级='" & Trim(Combo1.Text & " ") & "'"
  End If
End If
If Check3.Value = vbChecked Then
  If Trim(sql) = "" Then
    sql = "合同编号='" & Trim(Text3.Text & " ") & "'"
  Else
    sql = sql & "and 合同编号='" & Trim(Text3.Text & " ") & "'"
  End If
End If
If Check4.Value = vbChecked Then
  If Trim(sql) = "" Then
    sql = "地区='" & Trim(Combo2.Text & " ") & "'"
  Else
    sql = sql & "and 地区='" & Trim(Combo2.Text & " ") & "'"
  End If
End If
conn.Open "provider=Microsoft.Jet.OLEDB.4.0; data source=" & App.Path & "\database\yh8888.mdb"
If Trim(sql) = "" Then
  MsgBox "请选择查询方式!", vbOKOnly + vbExclamation
  Exit Sub
End If
sql = "select * from 酒店合同 where " & sql
rs_findbook.CursorLocation = adUseClient
rs_findbook.Open sql, conn, adOpenKeyset, adLockPessimistic
DataGrid1.AllowAddNew = False
DataGrid1.AllowDelete = False
DataGrid1.AllowUpdate = False
If rs_findbook.RecordCount = 0 Then
  MsgBox "查询不到该合同信息!", vbOKOnly + vbExclamation
Else
  Set DataGrid1.DataSource = rs_findbook
End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Form_Load()
Dim dbName As String
Dim connSTR As String

On Error GoTo errEnd

dbName = App.Path
If Right(dbName, 1) <> "\" Then dbName = dbName + "\"
dbName = dbName + "DataBase\yh8888.mdb"

connSTR = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbName & ";Persist Security Info=False"
Adodc1.ConnectionString = connSTR

Combo1.AddItem "五星级"
Combo1.AddItem "准五星级"
Combo1.AddItem "四星级"
Combo1.AddItem "准四星级"
Combo1.AddItem "三星级"
Combo1.AddItem "准三星级"
Combo1.AddItem "二星级"
Combo1.AddItem "准二星级"

Combo2.AddItem "白云区"
Combo2.AddItem "越秀区"
Combo2.AddItem "东山区"
Combo2.AddItem "海珠区"
Combo2.AddItem "荔湾区"
Combo2.AddItem "花都区"
Combo2.AddItem "天河区"

Exit Sub

errEnd:
    MsgBox Err.Description, vbOKOnly + vbExclamation, "打开数据库出错"
End Sub


⌨️ 快捷键说明

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