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

📄 krhf.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 krhff 
   Caption         =   "客人换房"
   ClientHeight    =   3555
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   6285
   LinkTopic       =   "Form3"
   ScaleHeight     =   3555
   ScaleWidth      =   6285
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame3 
      Caption         =   "可选客房"
      Height          =   1455
      Left            =   3000
      TabIndex        =   10
      Top             =   2040
      Width           =   3255
      Begin MSDataGridLib.DataGrid DataGrid2 
         Bindings        =   "krhf.frx":0000
         Height          =   1095
         Left            =   120
         TabIndex        =   11
         Top             =   240
         Width           =   3015
         _ExtentX        =   5318
         _ExtentY        =   1931
         _Version        =   393216
         AllowUpdate     =   0   'False
         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
   End
   Begin MSAdodcLib.Adodc Adodc2 
      Height          =   495
      Left            =   6600
      Top             =   2400
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   873
      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         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=KFGL.MDB;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=KFGL.MDB;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from kf where 状态= ""空房"""
      Caption         =   "Adodc2"
      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 MSAdodcLib.Adodc Adodc1 
      Height          =   495
      Left            =   6480
      Top             =   1920
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   873
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=KFGL.MDB;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=KFGL.MDB;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "djb"
      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.Frame Frame2 
      Caption         =   "客人信息"
      Height          =   1815
      Left            =   3000
      TabIndex        =   6
      Top             =   120
      Width           =   3255
      Begin MSDataGridLib.DataGrid DataGrid1 
         Bindings        =   "krhf.frx":0015
         Height          =   1455
         Left            =   120
         TabIndex        =   7
         Top             =   240
         Width           =   3015
         _ExtentX        =   5318
         _ExtentY        =   2566
         _Version        =   393216
         AllowUpdate     =   0   'False
         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
   End
   Begin VB.CommandButton Command2 
      Caption         =   "放弃"
      Height          =   375
      Left            =   1680
      TabIndex        =   5
      Top             =   3120
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "换房"
      Height          =   375
      Left            =   120
      TabIndex        =   4
      Top             =   3120
      Width           =   1095
   End
   Begin VB.Frame Frame1 
      Height          =   2775
      Left            =   0
      TabIndex        =   0
      Top             =   120
      Width           =   2895
      Begin VB.Shape Shape3 
         Height          =   375
         Left            =   960
         Top             =   2160
         Width           =   1815
      End
      Begin VB.Shape Shape2 
         Height          =   375
         Left            =   960
         Top             =   1320
         Width           =   1815
      End
      Begin VB.Shape Shape1 
         Height          =   375
         Left            =   960
         Top             =   360
         Width           =   1815
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         Caption         =   "Label8"
         DataField       =   "房号"
         DataSource      =   "Adodc2"
         Height          =   180
         Left            =   1080
         TabIndex        =   14
         Top             =   2280
         Width           =   540
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         Caption         =   "Label7"
         DataField       =   "客人姓名"
         DataSource      =   "Adodc1"
         Height          =   180
         Left            =   1080
         TabIndex        =   13
         Top             =   1440
         Width           =   540
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         Caption         =   "Label6"
         DataField       =   "房号"
         DataSource      =   "Adodc1"
         Height          =   180
         Left            =   1080
         TabIndex        =   12
         Top             =   480
         Width           =   540
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "新房号:"
         Height          =   180
         Left            =   120
         TabIndex        =   3
         Top             =   2160
         Width           =   630
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "客人姓名:"
         Height          =   180
         Left            =   120
         TabIndex        =   2
         Top             =   1320
         Width           =   810
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "原房号:"
         Height          =   180
         Left            =   120
         TabIndex        =   1
         Top             =   360
         Width           =   630
      End
   End
   Begin VB.Label Label5 
      Caption         =   "Label5"
      DataField       =   "单价"
      DataSource      =   "Adodc2"
      Height          =   495
      Left            =   6600
      TabIndex        =   9
      Top             =   1080
      Width           =   1575
   End
   Begin VB.Label Label4 
      Caption         =   "Label4"
      DataField       =   "类别"
      DataSource      =   "Adodc2"
      Height          =   375
      Left            =   6480
      TabIndex        =   8
      Top             =   600
      Width           =   1455
   End
End
Attribute VB_Name = "krhff"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Command1_Click()
Dim rs_chang As New ADODB.Recordset
Dim rs_chang1 As New ADODB.Recordset
Dim rs_chang2 As New ADODB.Recordset
  Dim sql As String
  Dim sql1 As String
  Dim sql2 As String
  Dim conn As String
 conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=kfgl.mdb;Persist Security Info=False"
    
     sql = "select * from djb where 房号='" & Label6.Caption & "'"
     sql1 = "select * from kf where 房号='" & Label8.Caption & "'"
     sql2 = "select * from kf where 房号='" & Label6.Caption & "'"
    
     rs_chang.Open sql, conn, adOpenKeyset, adLockPessimistic
     rs_chang1.Open sql1, conn, adOpenKeyset, adLockPessimistic
     rs_chang2.Open sql2, conn, adOpenKeyset, adLockPessimistic
     rs_chang.Fields(0) = Label8.Caption
     rs_chang.Fields(2) = Label5.Caption
     rs_chang.Fields(5) = Label4.Caption
     
     rs_chang.Update
     rs_chang.Close
     MsgBox "换房成功!", vbOKOnly + vbExclamation, ""
     
     rs_chang1.Fields(3) = "入住"
     rs_chang1.Update
     rs_chang1.Close
  
 rs_chang2.Fields(3) = "空房"
     rs_chang2.Update
     rs_chang2.Close
  Adodc1.Refresh
 Adodc2.Refresh
 
End Sub

Private Sub Command2_Click()
Unload Me

End Sub

Private Sub Form_Activate()
Adodc1.Refresh
Adodc2.Refresh

End Sub

⌨️ 快捷键说明

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