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

📄 form26.frm

📁 利用VB编写的一个完整的酒店管理程序,支持双数据库!
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form26 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "房间操作"
   ClientHeight    =   3855
   ClientLeft      =   45
   ClientTop       =   315
   ClientWidth     =   4170
   LinkTopic       =   "Form26"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3855
   ScaleWidth      =   4170
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.Frame Frame1 
      BackColor       =   &H00C0FFC0&
      Caption         =   "请选择您要进行的操作"
      Height          =   3255
      Left            =   0
      TabIndex        =   1
      Top             =   0
      Width           =   4095
      Begin VB.CommandButton Command6 
         Caption         =   "房间号"
         Height          =   375
         Left            =   480
         TabIndex        =   8
         Top             =   360
         Width           =   1095
      End
      Begin VB.TextBox txtfield 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   15.75
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Index           =   0
         Left            =   1560
         TabIndex        =   7
         Top             =   240
         Width           =   2295
      End
      Begin VB.CommandButton Command5 
         Caption         =   "改为自用房"
         Height          =   495
         Left            =   2160
         TabIndex        =   6
         Top             =   1800
         Width           =   1695
      End
      Begin VB.CommandButton Command4 
         Caption         =   "改为打扫房"
         Height          =   495
         Left            =   2160
         TabIndex        =   5
         Top             =   1080
         Width           =   1695
      End
      Begin VB.CommandButton Command3 
         Caption         =   "改为入住房"
         Height          =   495
         Left            =   240
         TabIndex        =   4
         Top             =   1800
         Width           =   1695
      End
      Begin VB.CommandButton Command2 
         Caption         =   "改为维修房"
         Height          =   495
         Left            =   240
         TabIndex        =   3
         Top             =   2520
         Width           =   1695
      End
      Begin VB.CommandButton Command1 
         Caption         =   "改为空闲房"
         Height          =   495
         Left            =   240
         TabIndex        =   2
         Top             =   1080
         Width           =   1695
      End
   End
   Begin VB.CommandButton Command7 
      Caption         =   "关闭"
      Height          =   375
      Left            =   2520
      TabIndex        =   0
      Top             =   3360
      Width           =   1335
   End
End
Attribute VB_Name = "Form26"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'FIXIT: 使用 Option Explicit 可以避免隐式创建 Variant 类型的变量                                          FixIT90210ae-R383-H1984
Private Sub Command1_Click()
If Trim(txtfield(0).Text) = "" Then
      MsgBox "对不起,房间号必须输入?   ", vbInformation, "Hello!"
      txtfield(0).SetFocus
      Exit Sub
  End If
   
 '开始保存内容
   Dim db As Database
  Dim EF As Recordset
  
  Set db = OpenDatabase(ConData, False, False, Constr)
  Set EF = db.OpenRecordset("Select * from kf where 房间号= '" & txtfield(0).Text & "'", dbOpenDynaset)
  
    
      '==================1
'FIXIT: 用 "Trim$" 函数替换 "Trim" 函数                                                           FixIT90210ae-R9757-R1B8ZE
       If Trim(txtfield(0).Text) <> "" Then
          EF.Edit
          EF("房态") = "空房"
          
           
          
          EF.Update
          
          
       End If
      '-----------------2
      
      '-----------------
      
  EF.Close
  db.Close
   
  MsgBox "房间状态已经修改为空闲   ", vbInformation
  
  'Caozuo = "修改房态按钮 '" & txtfield(0).Text & " '房间为空闲 "
'lu_time = Now
'RiZhil
  

 txtfield(0) = ""
 txtfield(0).SetFocus


End Sub




Private Sub Command2_Click()
If Trim(txtfield(0).Text) = "" Then
      MsgBox "对不起,房间号必须输入?   ", vbInformation, "Hello!"
      txtfield(0).SetFocus
      Exit Sub
  End If
   
 '开始保存内容
   Dim db As Database
  Dim EF As Recordset
  
  Set db = OpenDatabase(ConData, False, False, Constr)
  Set EF = db.OpenRecordset("Select * from kf where 房间号= '" & txtfield(0).Text & "'", dbOpenDynaset)
  
    
      '==================1
'FIXIT: 用 "Trim$" 函数替换 "Trim" 函数                                                           FixIT90210ae-R9757-R1B8ZE
       If Trim(txtfield(0).Text) <> "" Then
          EF.Edit
          EF("房态") = "维修"
          
           
          
          EF.Update
          
          
       End If
      '-----------------2
      
      '-----------------
      
  EF.Close
  db.Close
   
  MsgBox "房间状态已经修改为维修   ", vbInformation
' Caozuo = "修改房态按钮 '" & txtfield(0).Text & " '房间为维修 "
'lu_time = Now
'RiZhil
 txtfield(0).Text = ""
 txtfield(0).SetFocus
End Sub

Private Sub Command3_Click()
If Trim(txtfield(0).Text) = "" Then
      MsgBox "对不起,房间号必须输入?   ", vbInformation, "Hello!"
      txtfield(0).SetFocus
      Exit Sub
  End If
   
 '开始保存内容
   Dim db As Database
  Dim EF As Recordset
  
  Set db = OpenDatabase(ConData, False, False, Constr)
  Set EF = db.OpenRecordset("Select * from kf where 房间号= '" & txtfield(0).Text & "'", dbOpenDynaset)
  
    
      '==================1
'FIXIT: 用 "Trim$" 函数替换 "Trim" 函数                                                           FixIT90210ae-R9757-R1B8ZE
       If Trim(txtfield(0).Text) <> "" Then
          EF.Edit
          EF("房态") = "售出"
          
           
          
          EF.Update
          
          
       End If
      '-----------------2
      
      '-----------------
      
  EF.Close
  db.Close
   
  MsgBox "房间状态已经修改为入住   ", vbInformation
 'Caozuo = "修改房态按钮 '" & txtfield(0).Text & " '房间为入住 "
'lu_time = Now
'RiZhil
 txtfield(0).Text = ""
 txtfield(0).SetFocus
End Sub

Private Sub Command4_Click()
If Trim(txtfield(0).Text) = "" Then
      MsgBox "对不起,房间号必须输入?   ", vbInformation, "Hello!"
      txtfield(0).SetFocus
      Exit Sub
  End If
   
 '开始保存内容
   Dim db As Database
  Dim EF As Recordset
  
  Set db = OpenDatabase(ConData, False, False, Constr)
  Set EF = db.OpenRecordset("Select * from kf where 房间号= '" & txtfield(0).Text & "'", dbOpenDynaset)
  
    
      '==================1
'FIXIT: 用 "Trim$" 函数替换 "Trim" 函数                                                           FixIT90210ae-R9757-R1B8ZE
       If Trim(txtfield(0).Text) <> "" Then
          EF.Edit
          EF("房态") = "脏房"
          
           
          
          EF.Update
          
          
       End If
      '-----------------2
      
      '-----------------
      
  EF.Close
  db.Close
    'Caozuo = "修改房态按钮 '" & txtfield(0).Text & " '房间为打扫"
'lu_time = Now
'RiZhil
  MsgBox "房间状态已经修改为打扫   ", vbInformation

 txtfield(0).Text = ""
 txtfield(0).SetFocus
End Sub

Private Sub Command5_Click()
If Trim(txtfield(0).Text) = "" Then
      MsgBox "对不起,房间号必须输入?   ", vbInformation, "Hello!"
      txtfield(0).SetFocus
      Exit Sub
  End If
   
 '开始保存内容
   Dim db As Database
  Dim EF As Recordset
  
  Set db = OpenDatabase(ConData, False, False, Constr)
  Set EF = db.OpenRecordset("Select * from kf where 房间号= '" & txtfield(0).Text & "'", dbOpenDynaset)
  
    
      '==================1
'FIXIT: 用 "Trim$" 函数替换 "Trim" 函数                                                           FixIT90210ae-R9757-R1B8ZE
       If Trim(txtfield(0).Text) <> "" Then
          EF.Edit
          EF("房态") = "自用"
          
           
          
          EF.Update
          
          
       End If
      '-----------------2
      
      '-----------------
      
  EF.Close
  db.Close
    'Caozuo = "修改房态按钮 '" & txtfield(0).Text & " '房间为自用 "
'lu_time = Now
'RiZhil
  MsgBox "房间状态已经修改为自用   ", vbInformation


 txtfield(0).Text = ""
 txtfield(0).SetFocus
End Sub

Private Sub Command7_Click()
Unload Me
End Sub




⌨️ 快捷键说明

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