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

📄 frmmain.frm

📁 简单的酒店管理程序。
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.MDIForm frmMain 
   BackColor       =   &H8000000C&
   Caption         =   "宾馆管理信息系统"
   ClientHeight    =   4596
   ClientLeft      =   132
   ClientTop       =   732
   ClientWidth     =   7092
   LinkTopic       =   "MDIForm1"
   StartUpPosition =   3  'Windows Default
   Begin MSComctlLib.StatusBar sbStatusBar 
      Align           =   2  'Align Bottom
      Height          =   264
      Left            =   0
      TabIndex        =   0
      Top             =   8256
      Width           =   12192
      _ExtentX        =   21505
      _ExtentY        =   466
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   3
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Object.Width           =   15896
            Text            =   "Status"
            TextSave        =   "Status"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            AutoSize        =   2
            TextSave        =   "2001-11-12"
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   5
            AutoSize        =   2
            TextSave        =   "22:09"
         EndProperty
      EndProperty
   End
   Begin VB.Menu menuSystem 
      Caption         =   "系统"
      Begin VB.Menu menuModifypwd 
         Caption         =   "修改密码"
      End
      Begin VB.Menu menuAdduser 
         Caption         =   "添加用户"
      End
      Begin VB.Menu menuExit 
         Caption         =   "退出系统"
      End
   End
   Begin VB.Menu menuRooms 
      Caption         =   "客房信息管理"
      Begin VB.Menu menuRoomtype 
         Caption         =   "设置客房标准"
         Begin VB.Menu menuAddroomtype 
            Caption         =   "添加客房标准"
         End
         Begin VB.Menu menuModifyroomtype 
            Caption         =   "修改客房标准"
         End
         Begin VB.Menu menuDeleteroomtype 
            Caption         =   "删除客房标准"
         End
      End
      Begin VB.Menu menuSetrooms 
         Caption         =   "设置客房信息"
         Begin VB.Menu menuAddroom 
            Caption         =   "添加房间信息"
         End
         Begin VB.Menu menuModifyroom 
            Caption         =   "修改房间信息"
         End
         Begin VB.Menu menuDeleteroom 
            Caption         =   "删除客房信息"
         End
         Begin VB.Menu menuInquireroom 
            Caption         =   "查询客房信息"
         End
      End
   End
   Begin VB.Menu menuBookin 
      Caption         =   "订房信息管理"
      Begin VB.Menu menuInquirerooms 
         Caption         =   "查询剩余客房信息"
      End
      Begin VB.Menu menuAddbookroom 
         Caption         =   "添加订房信息"
      End
      Begin VB.Menu menuModifybookroom 
         Caption         =   "修改订房信息"
      End
      Begin VB.Menu menuInquirebookroom 
         Caption         =   "查询订房信息"
      End
   End
   Begin VB.Menu menuCheckout 
      Caption         =   "结算信息管理"
      Begin VB.Menu menuAddcheckout 
         Caption         =   "添加结算信息"
      End
      Begin VB.Menu menuModifycheckout 
         Caption         =   "修改结算信息"
      End
      Begin VB.Menu menuInquirecheckout 
         Caption         =   "查询结算信息"
      End
   End
   Begin VB.Menu menuHelp 
      Caption         =   "帮助"
      Begin VB.Menu menuAbout 
         Caption         =   "About"
      End
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub MDIForm_Load()
    Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
    Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
    Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
    Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
    
End Sub





Private Sub MDIForm_Unload(Cancel As Integer)
    If Me.WindowState <> vbMinimized Then
        SaveSetting App.Title, "Settings", "MainLeft", Me.Left
        SaveSetting App.Title, "Settings", "MainTop", Me.Top
        SaveSetting App.Title, "Settings", "MainWidth", Me.Width
        SaveSetting App.Title, "Settings", "MainHeight", Me.Height
    End If
End Sub

Private Sub menuAddbookroom_Click()
    gintBmode = 1
    frmBookin1.Show
    frmBookin1.ZOrder 0
End Sub

Private Sub menuAddcheckout_Click()
    gintCmode = 1
    frmCheckout1.Show
    frmCheckout1.ZOrder 0
End Sub

Private Sub menuAddroom_Click()
    gintRmode = 1
    frmRoom1.Show
    frmRoom1.ZOrder 0
End Sub

Private Sub menuAddroomtype_Click()
    gintTmode = 1
    frmRoomtype1.Show
    frmRoomtype1.ZOrder 0
End Sub

Private Sub menuDeleteroom_Click()
    Dim txtSQL As String
    Dim intCount As Integer
    Dim mrc As ADODB.Recordset
    Dim MsgText As String
    
    
    If flagTedit Then
        If frmRoom.msgList.Rows > 1 Then
            If MsgBox("真的要删除这条文件记录么?", vbOKCancel + vbExclamation, "警告") = vbOK Then
                intCount = frmRoom.msgList.Row
                txtSQL = "delete from rooms where roomNO='" & Trim(frmRoom.msgList.TextMatrix(intCount, 1)) & "'"
                Set mrc = ExecuteSQL(txtSQL, MsgText)
                
                Unload frmRoom
                frmRoom.txtSQL = "select * from rooms"
                frmRoom.Show
            End If
        End If
    End If
End Sub

Private Sub menuDeleteroomtype_Click()
    Dim txtSQL As String
    Dim intCount As Integer
    Dim mrc As ADODB.Recordset
    Dim MsgText As String
    
    
    If flagTedit Then
        If frmRoomtype.msgList.Rows > 1 Then
            If MsgBox("真的要删除这条文件记录么?", vbOKCancel + vbExclamation, "警告") = vbOK Then
                intCount = frmRoomtype.msgList.Row
                txtSQL = "delete from roomtype where typeid='" & Trim(frmRoomtype.msgList.TextMatrix(intCount, 1)) & "'"
                Set mrc = ExecuteSQL(txtSQL, MsgText)
                
                Unload frmRoomtype
                frmRoomtype.txtSQL = "select * from roomtype"
                frmRoomtype.Show
            End If
        End If
    End If
End Sub

Private Sub menuInquirebookroom_Click()
    frmBookin2.Show
End Sub

Private Sub menuInquirecheckout_Click()
    frmCheckout2.Show
End Sub

Private Sub menuInquireroom_Click()
    frmRoom2.Show
End Sub

Private Sub menuInquirerooms_Click()
    frmRoomsurplus.Show
    
End Sub

Private Sub menuModifybookroom_Click()
    Dim intCount As Integer
    If flagBedit Then
        If frmBookin.msgList.Rows > 1 Then
            gintBmode = 2
            intCount = frmBookin.msgList.Row
            frmBookin1.txtSQL = "select bookno,customname,customID,roomno,indate,discount,inmemo from bookin where ammount = '0' and bookno ='" & Trim(frmBookin.msgList.TextMatrix(intCount, 1)) & "'"
            frmBookin1.Show
        Else
            Call menuAddbookroom_Click
        End If
    Else
        frmBookin.txtSQL = "select bookno,customname,customID,roomno,indate,discount,inmemo from bookin where ammount = '0'"
        frmBookin.Show
    End If
End Sub

Private Sub menuModifycheckout_Click()
    Dim intCount As Integer
    If flagCedit Then
        If frmCheckout.msgList.Rows > 1 Then
            gintCmode = 2
            intCount = frmCheckout.msgList.Row
            frmCheckout1.txtSQL = "select * from bookin where bookno ='" & Trim(frmCheckout.msgList.TextMatrix(intCount, 1)) & "'"
            frmCheckout1.Show
        Else
            Call menuAddcheckout_Click
        End If
    Else
        frmCheckout.txtSQL = "select * from bookin where ammount <> '0'"
        frmCheckout.Show
    End If
End Sub

Private Sub menuModifyroom_Click()
    Dim intCount As Integer
    If flagRedit Then
        If frmRoom.msgList.Rows > 1 Then
            gintRmode = 2
            intCount = frmRoom.msgList.Row
            frmRoom1.txtSQL = "select * from rooms where roomNO ='" & Trim(frmRoom.msgList.TextMatrix(intCount, 1)) & "'"
            frmRoom1.Show
        Else
            Call menuAddroom_Click
        End If
    Else
        frmRoom.txtSQL = "select * from rooms"
        frmRoom.Show
    End If
End Sub

Private Sub menuModifyroomtype_Click()
    Dim intCount As Integer
    If flagTedit Then
        If frmRoomtype.msgList.Rows > 1 Then
            gintTmode = 2
            intCount = frmRoomtype.msgList.Row
            frmRoomtype1.txtSQL = "select * from roomtype where typeid='" & Trim(frmRoomtype.msgList.TextMatrix(intCount, 1)) & "'"
            frmRoomtype1.Show
        Else
            Call menuAddroomtype_Click
        End If
    Else
        frmRoomtype.txtSQL = "select * from roomtype"
        frmRoomtype.Show
    End If
End Sub

⌨️ 快捷键说明

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