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

📄 setroom1.frm

📁 vb酒店管理系统的原码下载
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Height          =   300
         Left            =   630
         TabIndex        =   1
         Top             =   420
         Width           =   840
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   2130
      Top             =   885
      Visible         =   0   'False
      Width           =   1635
      _ExtentX        =   2884
      _ExtentY        =   582
      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         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      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
End
Attribute VB_Name = "setroom1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'星级酒店管理系统最初功能演示版,提供所有星级酒店管理中的客房管理,
'房态管理,客史管理,客人资料管理,帐务管理,报表管理,餐饮收费管理
'菜谱管理,夜审处理,数据库备份等功能.所有功能皆可以运行,(但有一些BUG未处理)
'此代码完全可以完成星级酒店上述管理功能.(提供者:帅)
'--------------------------------------------------------------
'代码编写于:2001.12  系统分析:帅   代码编写:帅    版权所有:帅
'--------------------------------------------------------------
'本份代码仅提供给程序太平洋的所有朋友学习,研究之用.
'其它网站一律不得转载,否则为侵权行为,本人保留法律追诉权力.
'这也是本人最早的VB版程序,代码质量不好.望笑纳.:)
'--------------------------------------------------------------
'提供日期:2003-05-31    提供者:帅
'--------------------------------------------------------------
'系统提从与ACCESS或SQL相接,在登录时,选择全局数据库,就与SQL数据库
'连接,字符串存放在SERVER.DAT文本文件中;选择本地数据库,与本地ACCESS
'数据库相连,连接字符串存放在LOCAT.DAT文件中.(当前存放为e:\hotel2\room.mdb)
'---------------------------------------------------------------
'将ACCESS中所有表导入SQL中,并将有的表中的ID字段改为自动编码,就可以使用.
'---------------------------------------------------------------------
'
'
Private Sub Command1_Click()
    Unload Me
End Sub

Private Sub Command2_Click()
    Select Case RoomForm_Type
    Case "增加"
        Adodc1.ConnectionString = My_PROVIDER
        Adodc1.CommandType = adCmdText
        Adodc1.RecordSource = "select * from 客房"
        Adodc1.Refresh
        Adodc1.Recordset.AddNew
        Adodc1.Recordset.Fields("房号") = Me.Text1.Text
        Adodc1.Recordset.Fields("楼号") = Me.Text2.Text
        Adodc1.Recordset.Fields("层") = Me.Text3.Text
        Adodc1.Recordset.Fields("日房价") = Me.Text4.Text
        Adodc1.Recordset.Fields("床位数") = Me.Text5.Text
        Adodc1.Recordset.Fields("类型") = Me.Combo1.Text
        Adodc1.Recordset.Fields("当前状态") = Me.Combo2.Text
        Adodc1.Recordset.Fields("电话") = Me.Text7.Text
        Adodc1.Recordset.Fields("出售方式") = Me.Text6.Text
        Adodc1.Recordset.Update
        Adodc1.Recordset.Close
    Case "修改"
        Adodc1.ConnectionString = My_PROVIDER
        Adodc1.CommandType = adCmdText
        Adodc1.RecordSource = "select * from 客房 where 房号 like '" & RoomNO & "'"
        Adodc1.Refresh
        If Adodc1.Recordset.RecordCount = 1 Then
        Adodc1.Recordset.Fields("房号") = Me.Text1.Text
        Adodc1.Recordset.Fields("楼号") = Me.Text2.Text
        Adodc1.Recordset.Fields("层") = Me.Text3.Text
        Adodc1.Recordset.Fields("日房价") = Me.Text4.Text
        Adodc1.Recordset.Fields("床位数") = Me.Text5.Text
        Adodc1.Recordset.Fields("类型") = Me.Combo1.Text
        Adodc1.Recordset.Fields("当前状态") = Me.Combo2.Text
        Adodc1.Recordset.Fields("电话") = Me.Text7.Text
        Adodc1.Recordset.Fields("出售方式") = Me.Text6.Text
        Adodc1.Recordset.Update
        Adodc1.Recordset.Close
        Else
        If Adodc1.Recordset.RecordCount > 1 Then
        Adodc1.Recordset.MoveNext
        Adodc1.Recordset.Fields("房号") = Me.Text1.Text
        Adodc1.Recordset.Fields("楼号") = Me.Text2.Text
        Adodc1.Recordset.Fields("层") = Me.Text3.Text
        Adodc1.Recordset.Fields("日房价") = Me.Text4.Text
        Adodc1.Recordset.Fields("床位数") = Me.Text5.Text
        Adodc1.Recordset.Fields("类型") = Me.Combo1.Text
        Adodc1.Recordset.Fields("当前状态") = Me.Combo2.Text
        Adodc1.Recordset.Fields("电话") = Me.Text7.Text
        Adodc1.Recordset.Fields("出售方式") = Me.Text6.Text
        Adodc1.Recordset.Update
        Adodc1.Recordset.Close
        Else
        Adodc1.Recordset.AddNew
        Adodc1.Recordset.Fields("房号") = Me.Text1.Text
        Adodc1.Recordset.Fields("楼号") = Me.Text2.Text
        Adodc1.Recordset.Fields("层") = Me.Text3.Text
        Adodc1.Recordset.Fields("日房价") = Me.Text4.Text
        Adodc1.Recordset.Fields("床位数") = Me.Text5.Text
        Adodc1.Recordset.Fields("类型") = Me.Combo1.Text
        Adodc1.Recordset.Fields("当前状态") = Me.Combo2.Text
        Adodc1.Recordset.Fields("电话") = Me.Text7.Text
        Adodc1.Recordset.Fields("出售方式") = Me.Text6.Text
        Adodc1.Recordset.Update
        Adodc1.Recordset.Close
        End If
        
        End If
    End Select
    Unload Me
End Sub

Private Sub Form_Load()
    Adodc1.ConnectionString = My_PROVIDER
    Adodc1.CommandType = adCmdText
    Adodc1.RecordSource = "select * from 项目编码 where 编码 like 'FL%' order by 名称"
    Adodc1.Refresh
    While Not Adodc1.Recordset.EOF
        Me.Combo1.AddItem Adodc1.Recordset.Fields("名称")
        If Adodc1.Recordset.Fields("首选项") = "是" Then
            Me.Combo1.Text = Adodc1.Recordset.Fields("名称")
        End If
        Adodc1.Recordset.MoveNext
    Wend
    Adodc1.Recordset.Close
    
    Adodc1.ConnectionString = My_PROVIDER
    Adodc1.CommandType = adCmdText
    Adodc1.RecordSource = "select * from 房间状态"
    Adodc1.Refresh
    If Adodc1.Recordset.RecordCount > 0 Then
        While Not Adodc1.Recordset.EOF
            Me.Combo2.AddItem Adodc1.Recordset.Fields("房间状态")
            Adodc1.Recordset.MoveNext
        Wend
    End If
    Adodc1.Recordset.Close
    Select Case RoomForm_Type
    Case "增加"
        Me.Label8.Caption = "增加客房"
        
    Case "修改"
        Me.Label8.Caption = "修改客房资料"
        Me.Caption = "修改" & RoomNO & "客房资料"
        Adodc1.ConnectionString = My_PROVIDER
        Adodc1.CommandType = adCmdText
        Adodc1.RecordSource = "select * from 客房 where 房号 like '" & RoomNO & "'"
        Adodc1.Refresh
        If Adodc1.Recordset.RecordCount > 0 Then
            Me.Text1.Text = IIf(IsNull(Adodc1.Recordset.Fields("房号")), "", Adodc1.Recordset.Fields("房号"))
            Me.Text2.Text = IIf(IsNull(Adodc1.Recordset.Fields("楼号")), "", Adodc1.Recordset.Fields("楼号"))
            Me.Text3.Text = IIf(IsNull(Adodc1.Recordset.Fields("层")), "", Adodc1.Recordset.Fields("层"))
            Me.Text4.Text = IIf(IsNull(Adodc1.Recordset.Fields("日房价")), 0, Adodc1.Recordset.Fields("日房价"))
            Me.Text5.Text = IIf(IsNull(Adodc1.Recordset.Fields("床位数")), 0, Adodc1.Recordset.Fields("床位数"))
            Me.Combo1.Text = IIf(IsNull(Adodc1.Recordset.Fields("类型")), 0, Adodc1.Recordset.Fields("类型"))
            Me.Combo2.Text = IIf(IsNull(Adodc1.Recordset.Fields("当前状态")), 0, Adodc1.Recordset.Fields("当前状态"))
        Else
            MsgBox "操作错误:您没有选择要修改的房间!", 48, "提示"
            Unload Me
        End If
    End Select
    
End Sub

⌨️ 快捷键说明

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