📄 房态图.frm
字号:
Begin VB.OptionButton Option1
Caption = "按楼层显示"
Height = 255
Left = 350
TabIndex = 2
Top = 300
Width = 2385
End
End
Begin MSAdodcLib.Adodc Adodc9
Height = 345
Left = 4290
Top = 5205
Visible = 0 'False
Width = 1995
_ExtentX = 3519
_ExtentY = 609
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 = "Adodc9"
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 ComctlLib.ListView ListView1
Height = 5610
Left = 90
TabIndex = 0
Top = 75
Width = 6075
_ExtentX = 10716
_ExtentY = 9895
LabelWrap = -1 'True
HideSelection = -1 'True
_Version = 327682
Icons = "imgLarge"
SmallIcons = "imgSmall"
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
NumItems = 0
End
Begin VB.Label Label13
Caption = "出租率:"
Height = 255
Left = 4920
TabIndex = 39
Top = 6165
Width = 1110
End
Begin VB.Label Label12
Caption = "空 房:"
Height = 285
Left = 3435
TabIndex = 34
Top = 6150
Width = 1500
End
Begin VB.Label Label11
Caption = "空 房:"
Height = 285
Left = 1860
TabIndex = 33
Top = 6150
Width = 1500
End
Begin VB.Label Label10
Caption = "空 房:"
Height = 285
Left = 255
TabIndex = 32
Top = 6135
Width = 1500
End
Begin VB.Label Label9
Caption = "空 房:"
Height = 285
Left = 3435
TabIndex = 31
Top = 5820
Width = 1500
End
Begin VB.Label Label8
Caption = "空 房:"
Height = 285
Left = 1845
TabIndex = 30
Top = 5820
Width = 1500
End
Begin VB.Label Label7
Caption = "空 房:"
Height = 285
Left = 240
TabIndex = 29
Top = 5805
Width = 1500
End
Begin ComctlLib.ImageList imgLarge
Left = 5940
Top = 5670
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 32
ImageHeight = 33
MaskColor = 12632256
_Version = 327682
BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
NumListImages = 5
BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "房态图.frx":5103
Key = ""
EndProperty
BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "房态图.frx":5DB5
Key = ""
EndProperty
BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "房态图.frx":6A67
Key = ""
EndProperty
BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "房态图.frx":7719
Key = ""
EndProperty
BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "房态图.frx":83CB
Key = ""
EndProperty
EndProperty
End
Begin ComctlLib.ImageList imgSmall
Left = 6225
Top = 6000
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 36
ImageHeight = 16
MaskColor = 12632256
_Version = 327682
BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
NumListImages = 1
BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "房态图.frx":907D
Key = ""
EndProperty
EndProperty
End
End
Attribute VB_Name = "房态图FORM"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'欢迎你下载使用本代码,本份代码由程序太平洋提供下载学习之用
'声明:
'1.本站所有代码的版权归原作者所有,如果你使用了在本站下载的源代码
' 引起的一切纠纷(后果)与本站无关,请您尊重原作者的劳动成果!
'2.若本站在代码上有侵权之处请您与站长联系,站长会及时更正。
'网站:http://www.dapha.net
'论坛:http://www.5ivb.net
'Email:dapha@etang.com
'CopyRight 2001-2005 By dapha.net
'整理时间:2003-12-8 12:22:14
'星级酒店管理系统最初功能演示版,提供所有星级酒店管理中的客房管理,
'房态管理,客史管理,客人资料管理,帐务管理,报表管理,餐饮收费管理
'菜谱管理,夜审处理,数据库备份等功能.所有功能皆可以运行,(但有一些BUG未处理)
'此代码完全可以完成星级酒店上述管理功能.(提供者:帅)
'--------------------------------------------------------------
'代码编写于:2001.12 系统分析:帅 代码编写:帅 版权所有:帅
'--------------------------------------------------------------
'本份代码仅提供给程序太平洋的所有朋友学习,研究之用.
'其它网站一律不得转载,否则为侵权行为,本人保留法律追诉权力.
'这也是本人最早的VB版程序,代码质量不好.望笑纳.:)
'--------------------------------------------------------------
'提供日期:2003-05-31 提供者:帅
'--------------------------------------------------------------
'系统提从与ACCESS或SQL相接,在登录时,选择全局数据库,就与SQL数据库
'连接,字符串存放在SERVER.DAT文本文件中;选择本地数据库,与本地ACCESS
'数据库相连,连接字符串存放在LOCAT.DAT文件中.(当前存放为e:\hotel2\room.mdb)
'---------------------------------------------------------------
'将ACCESS中所有表导入SQL中,并将有的表中的ID字段改为自动编码,就可以使用.
'---------------------------------------------------------------------
'
'
Dim CuanWeiShu As Long
Dim ZhuKeRenShu As Long
Dim Room(5) As Long
Dim Q_Name As String
Private Sub Command1_Click()
On Error GoTo err13
Dim List_item As ListItem
If Me.Text2.Text <> "" Then
Adodc9.ConnectionString = My_PROVIDER
Adodc9.CommandType = adCmdText
Adodc9.RecordSource = "select * from 客房 where 楼号 like '" & Me.Text1.Text & "' and 层 like '" & Me.Text2.Text & "'"
Adodc9.Refresh
Else
Adodc9.ConnectionString = My_PROVIDER
Adodc9.CommandType = adCmdText
Adodc9.RecordSource = "select * from 客房 where 楼号 like '" & Me.Text1.Text & "'"
Adodc9.Refresh
End If
Me.ListView1.ListItems.Clear
While Not Adodc9.Recordset.EOF
Select Case Adodc9.Recordset.Fields("当前状态")
Case "空房"
ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 1
Case "脏房"
ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 2
Case "维修房"
ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 3
Case "售出"
ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 4
Case "预订"
ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 5
Case Else
ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 1
End Select
Adodc9.Recordset.MoveNext
Wend
Adodc9.Recordset.Close
Exit Sub
err13:
MsgBox "操作错误,错误代码1013", 48, "提示"
End Sub
Private Sub Command2_Click()
On Error GoTo err14
Dim List_item As ListItem
Dim i As Long
If Me.Option3 Then
Adodc9.ConnectionString = My_PROVIDER
Adodc9.CommandType = adCmdText
Adodc9.RecordSource = "select * from 客房 where 类型 like '" & Me.Combo1.Text & "'"
Adodc9.Refresh
Else
Adodc9.ConnectionString = My_PROVIDER
Adodc9.CommandType = adCmdText
Adodc9.RecordSource = "select * from 客房 where 当前状态 like '" & Me.Combo1.Text & "'"
Adodc9.Refresh
End If
Me.ListView1.ListItems.Clear
For i = 0 To 4
Room(i) = 0
Next
While Not Adodc9.Recordset.EOF
Select Case Adodc9.Recordset.Fields("当前状态")
Case "空房"
ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 1
Room(0) = Room(0) + 1
Case "脏房"
ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 2
Room(1) = Room(1) + 1
Case "维修房"
ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 3
Room(2) = Room(2) + 1
Case "售出"
ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 4
Room(3) = Room(3) + 1
Case "预订"
ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 5
Room(4) = Room(4) + 1
Case Else
ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 1
End Select
Adodc9.Recordset.MoveNext
Wend
Adodc9.Recordset.Close
Me.Label7.Caption = "空房:" & CStr(Room(0))
Me.Label8.Caption = "脏房:" & CStr(Room(1))
Me.Label9.Caption = "维修房:" & CStr(Room(2))
Me.Label10.Caption = "售出:" & CStr(Room(3))
Me.Label11.Caption = "预订:" & CStr(Room(4))
Me.Label12.Caption = "合计:" & CStr(Room(0) + Room(1) + Room(2) + Room(3) + Room(4))
Me.Label13.Caption = "出租率:" & (Round(Room(3) / (Room(0) + Room(1) + Room(2) + Room(3) + Room(4)), 2) * 100) & "%"
Exit Sub
err14:
MsgBox "操作错误,错误代码1014", 48, "提示"
End Sub
Private Sub Command3_Click()
RoomNO = ""
Room_Rate = 0
Room_Statu = ""
Unload Me
End Sub
Private Sub Command4_Click()
On Error GoTo E200204
If QAccount_ID = "" Then
MsgBox "请注意:没有登记帐号,请通过其他方式查询!", 48, "提示"
Else
Registration_Type = "显示"
住宿登录.Show
End If
Exit Sub
E200204:
MsgBox "请注意:可能重复打开窗口,请先关闭后再查询!", 64, "提示"
End Sub
Private Sub Command5_Click()
On Error GoTo err15
If Registration_Type <> "快速入住" Then
If Room_Statu = "空房" Then
If Load_Statu = "使用" Then
Room_Use_Type = "包房"
Room_Update = True
Adodc9.Recordset.Close
Unload Me
End If
Else
If Room_Statu = "预订" Then
If Account_ID = QAccount_ID Then
Room_Use_Type = "包房"
Room_Update = True
Adodc9.Recordset.Close
Unload Me
Else
MsgBox "请注意:" & RoomNO & "房间当前状态是:[" & Room_Statu & "],被[" & QAccount_ID & "]帐号" & Room_Share_Type & ",不能" & Registration_Type & "!", 48, "提示"
Room_Update = False
End If
Else
If Room_Statu = "售出" Then
Select Case Room_Share_Type
Case "共享"
MsgBox "请注意:" & RoomNO & "房间当前状态是:[" & Room_Statu & "],被[" & QAccount_ID & "]帐号" & Room_Share_Type & ",不能" & Registration_Type & "!", 48, "提示"
Case "包房"
MsgBox "请注意:" & RoomNO & "房间当前状态是:[" & Room_Statu & "],被[" & QAccount_ID & "]帐号" & Room_Share_Type & ",不能" & Registration_Type & "!", 48, "提示"
Case Else
MsgBox "房间状态错误,请核查!", 64, "提示"
End Select
Room_Update = False
End If
End If
End If
Else
'快速入住
If Room_Statu = "空房" Then
Room_Use_Type = "包房"
Q_Name = ""
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -