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

📄 kfyd.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 kfyd 
   Caption         =   "客房预定"
   ClientHeight    =   5475
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   7125
   LinkTopic       =   "Form3"
   ScaleHeight     =   5475
   ScaleWidth      =   7125
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command3 
      Caption         =   "关闭"
      Height          =   495
      Left            =   4800
      TabIndex        =   23
      Top             =   4920
      Width           =   1335
   End
   Begin VB.CommandButton Command2 
      Caption         =   "刷新"
      Height          =   495
      Left            =   2760
      TabIndex        =   22
      Top             =   4920
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "预定"
      Height          =   495
      Left            =   840
      TabIndex        =   21
      Top             =   4920
      Width           =   1215
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   7200
      Top             =   480
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   661
      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         =   "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          =   4695
      Left            =   3480
      TabIndex        =   1
      Top             =   120
      Width           =   3495
      Begin VB.TextBox Text5 
         Height          =   375
         Left            =   1200
         TabIndex        =   20
         Text            =   "Text5"
         Top             =   3840
         Width           =   2175
      End
      Begin VB.TextBox Text4 
         Height          =   375
         Left            =   1200
         TabIndex        =   18
         Text            =   "Text4"
         Top             =   3360
         Width           =   2175
      End
      Begin VB.TextBox Text3 
         Height          =   375
         Left            =   1200
         TabIndex        =   17
         Text            =   "Text3"
         Top             =   2880
         Width           =   2175
      End
      Begin VB.TextBox Text2 
         Height          =   375
         Left            =   1200
         TabIndex        =   16
         Text            =   "Text2"
         Top             =   2400
         Width           =   2175
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   1200
         TabIndex        =   15
         Text            =   "Text1"
         Top             =   1920
         Width           =   2175
      End
      Begin VB.Shape Shape3 
         Height          =   375
         Left            =   1200
         Top             =   1320
         Width           =   2175
      End
      Begin VB.Shape Shape2 
         Height          =   375
         Left            =   1200
         Top             =   840
         Width           =   2175
      End
      Begin VB.Shape Shape1 
         Height          =   375
         Left            =   1200
         Top             =   240
         Width           =   2175
      End
      Begin VB.Label Label13 
         AutoSize        =   -1  'True
         Caption         =   "Label13"
         Height          =   180
         Left            =   1200
         TabIndex        =   19
         Top             =   4320
         Width           =   630
      End
      Begin VB.Label Label12 
         AutoSize        =   -1  'True
         Caption         =   "Label12"
         DataField       =   "单价"
         DataSource      =   "Adodc1"
         Height          =   180
         Left            =   1320
         TabIndex        =   14
         Top             =   1440
         Width           =   630
      End
      Begin VB.Label Label11 
         AutoSize        =   -1  'True
         Caption         =   "Label11"
         DataField       =   "类别"
         DataSource      =   "Adodc1"
         Height          =   180
         Left            =   1320
         TabIndex        =   13
         Top             =   960
         Width           =   630
      End
      Begin VB.Label Label10 
         AutoSize        =   -1  'True
         Caption         =   "Label10"
         DataField       =   "房号"
         DataSource      =   "Adodc1"
         Height          =   180
         Left            =   1320
         TabIndex        =   12
         Top             =   360
         Width           =   630
      End
      Begin VB.Label Label9 
         AutoSize        =   -1  'True
         Caption         =   "摘要:"
         Height          =   180
         Left            =   120
         TabIndex        =   11
         Top             =   3840
         Width           =   450
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         Caption         =   "操作员:"
         Height          =   180
         Left            =   120
         TabIndex        =   10
         Top             =   4320
         Width           =   630
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         Caption         =   "联系电话:"
         Height          =   180
         Left            =   120
         TabIndex        =   9
         Top             =   3360
         Width           =   810
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         Caption         =   "身份证号码:"
         Height          =   180
         Left            =   120
         TabIndex        =   8
         Top             =   2880
         Width           =   990
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "姓名:"
         Height          =   180
         Left            =   120
         TabIndex        =   7
         Top             =   2400
         Width           =   450
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "押金:"
         Height          =   180
         Left            =   120
         TabIndex        =   6
         Top             =   1920
         Width           =   450
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "标准价:"
         Height          =   180
         Left            =   120
         TabIndex        =   5
         Top             =   1320
         Width           =   630
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "类别:"
         Height          =   180
         Left            =   120
         TabIndex        =   4
         Top             =   840
         Width           =   450
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "房号:"
         Height          =   180
         Left            =   120
         TabIndex        =   3
         Top             =   240
         Width           =   450
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "空房信息"
      Height          =   4695
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   3255
      Begin MSDataGridLib.DataGrid DataGrid1 
         Bindings        =   "kfyd.frx":0000
         Height          =   4335
         Left            =   120
         TabIndex        =   2
         Top             =   240
         Width           =   3015
         _ExtentX        =   5318
         _ExtentY        =   7646
         _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
End
Attribute VB_Name = "kfyd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim rs_bookstyle As New ADODB.Recordset
Dim rs_bookstyle1 As New ADODB.Recordset
Dim conn As String
conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=kfgl.mdb;Persist Security Info=False"
Dim sql As String
Dim sql1 As String
If Text1.Text = "" Then
   MsgBox "押金不能为空!", vbOKOnly + vbExclamation, "错误"
   Exit Sub
   End If
If Text2.Text = "" Then
   MsgBox "客人姓名不能为空!", vbOKOnly + vbExclamation, "错误"
   Exit Sub
End If
If Text3.Text = "" Then
   MsgBox "身份证号码不能为空!", vbOKOnly + vbExclamation, "错误"
   Exit Sub
End If
If Text4.Text = "" Then
   MsgBox "联系电话不能为空!", vbOKOnly + vbExclamation, "错误"
   Exit Sub
End If
sql = "select * from yd where 房号='" & Label10.Caption & "'"
sql1 = "select * from kf where 房号='" & Label10.Caption & "'"

rs_bookstyle.Open sql, conn, adOpenKeyset, adLockPessimistic
rs_bookstyle1.Open sql1, conn, adOpenKeyset, adLockPessimistic
If rs_bookstyle1.Fields(3) = "空房" Then
   rs_bookstyle.AddNew
   rs_bookstyle.Fields(0) = Trim(Label10.Caption)
   rs_bookstyle.Fields(1) = Trim(Text2.Text)
   rs_bookstyle.Fields(2) = Trim(Label11.Caption)
   rs_bookstyle.Fields(3) = Trim(Label12.Caption)
   rs_bookstyle.Fields(4) = Trim(Text3.Text)
   rs_bookstyle.Fields(5) = Trim(Text1.Text)
   rs_bookstyle.Fields(6) = Trim(Text4.Text)
   rs_bookstyle.Fields(7) = Trim(Label13.Caption)
   rs_bookstyle.Fields(8) = Trim(Text5.Text)
   
rs_bookstyle.Update
   
MsgBox "预定成功!", vbOKOnly, ""
   

   
   
  rs_bookstyle.Close
Else
  MsgBox "房间已满!", vbOKOnly + vbExclamation, ""
   
   rs_bookstyle.Close
   Exit Sub
End If


rs_bookstyle1.Fields(3) = "预定"

rs_bookstyle1.Update
Adodc1.Refresh


End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Adodc1.Refresh
End Sub

Private Sub Command3_Click()
Unload Me

End Sub

Private Sub Form_Activate()
Adodc1.Refresh

End Sub

Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Label13.Caption = MDIForm1.StatusBar1.Panels(1).Text
End Sub

⌨️ 快捷键说明

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