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

📄 form1.frm

📁 宾馆管理系统 宾馆管理系统 宾馆管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmKfxx 
   Caption         =   "客房信息"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "返 回"
      Height          =   375
      Left            =   3600
      TabIndex        =   10
      Top             =   2040
      Width           =   855
   End
   Begin VB.CommandButton cmdSave 
      Caption         =   "保 存"
      Height          =   375
      Left            =   3600
      TabIndex        =   9
      Top             =   840
      Width           =   855
   End
   Begin VB.Frame Frame2 
      Caption         =   "备注信息"
      Height          =   855
      Left            =   240
      TabIndex        =   1
      Top             =   2040
      Width           =   3255
      Begin VB.TextBox Text4 
         Height          =   495
         Left            =   120
         TabIndex        =   11
         Top             =   240
         Width           =   3015
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "客房信息"
      Height          =   1815
      Left            =   240
      TabIndex        =   0
      Top             =   120
      Width           =   3255
      Begin VB.TextBox txtItem 
         Height          =   270
         Index           =   2
         Left            =   1200
         TabIndex        =   13
         Top             =   1320
         Width           =   1335
      End
      Begin VB.TextBox txtItem 
         Height          =   270
         Index           =   1
         Left            =   1200
         TabIndex        =   12
         Top             =   960
         Width           =   1695
      End
      Begin VB.ComboBox cboItem 
         Height          =   300
         Index           =   0
         ItemData        =   "Form1.frx":0000
         Left            =   1200
         List            =   "Form1.frx":000D
         TabIndex        =   7
         Text            =   "   标准间"
         Top             =   600
         Width           =   1695
      End
      Begin VB.TextBox txtItem 
         Height          =   270
         Index           =   0
         Left            =   1200
         TabIndex        =   6
         Top             =   240
         Width           =   1695
      End
      Begin VB.Label Label5 
         Caption         =   "/每天"
         Height          =   375
         Left            =   2640
         TabIndex        =   8
         Top             =   1320
         Width           =   375
      End
      Begin VB.Label Label4 
         Caption         =   "客房单价:"
         Height          =   255
         Left            =   240
         TabIndex        =   5
         Top             =   1320
         Width           =   855
      End
      Begin VB.Label Label3 
         Caption         =   "客房位置:"
         Height          =   255
         Left            =   240
         TabIndex        =   4
         Top             =   960
         Width           =   855
      End
      Begin VB.Label Label2 
         Caption         =   "客房类型:"
         Height          =   255
         Left            =   240
         TabIndex        =   3
         Top             =   600
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "客房编号:"
         Height          =   255
         Left            =   240
         TabIndex        =   2
         Top             =   240
         Width           =   855
      End
   End
End
Attribute VB_Name = "frmKfxx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub cmdSave_click()
   Dim intCount As Integer
   Dim sMeg As String
   Dim mrcc As ADODB.Recordset
 Dim MsgText As String
   If gintRmode = 1 Then
      txtSQL = "select * from rooms where roomNO='" & Trim(txtItem(0)) & "'"
      Set mrc = ExecuteSQL(txtSQL, MsgText)
      If mrc.EOF = False Then
         MsgBox "已经存在此客房编号的记录!", vbOKOnlyj + vbExclamation, "警告"
         txtItem(0).SetFocus
         Exit Sub
      End If
      mrc.Close
  End If
    If gintRmode = 2 Then
      txtSQL = "delete from rooms where roomNO='" & Trim(txtItem(0)) & "'"
      Set mrc = ExecuteSQL(txtSQL, MsgText)
    End If
      txtSQL = "select * from rooms"
      Set mrc = ExecuteSQL(txtSQL, MsgText)
      mrc.AddNew
      mrc.Fields(0) = Trim(txtItem(0))
      mrc.Fields(0) = Trim(cboItem(0))
      For intCount = 1 To 2
         If Trim(txtItem(intCount) & " ") = " " Then
            mrc.Fields(intCount + 1) = Null
         Else
            'mrc.Fields(intCount + 1) = Trim(txtItem(intCount))
         End If
        Next intCount
        mrc.Fields(4) = " "
        mrc.Fields(5) = Trim(txtItem(2))
        mrc.Update
        mrc.Close
        If gintRmode = 1 Then
            For intCount = 0 To 3
              txtItem(intCount) = " "
            Next intCount
            mblChange = False
          If flagRedit Then
            Unload frmRoom
            frmRoom.txtSQL = "select * from rooms"
            frmRoom.Show
          End If
        ElseIf gintRmode = 2 Then
           Unload Me
          If flagRedit Then
            Unload frmRoom
          End If
          frmRoom.txtSQL = "select * from rooms"
          frmRoom.Show
        End If
             
End Sub

Private Sub Command2_Click()
  Unload Me

End Sub

⌨️ 快捷键说明

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