vb酒店客房管理系统数据流图+er图+功能模块图_第1页
vb酒店客房管理系统数据流图+er图+功能模块图_第2页
vb酒店客房管理系统数据流图+er图+功能模块图_第3页
vb酒店客房管理系统数据流图+er图+功能模块图_第4页
vb酒店客房管理系统数据流图+er图+功能模块图_第5页
已阅读5页,还剩7页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

VB 酒店客房管理系统数据流图+ER 图+功能模块图 第一章、系统概述 1.1 项目研究的意义 第二章、系统需求分析 2.1 编写目的1 2.2 开发背景2 2.3 参考资料2 2.4 任务概述 2.4.1 实现目标2 2.4.2 运行环境3 2.3 条件限制3 2.5 数据描述 2.5.1 信息需求3 2.5.2 处理需求3 2.6 数据流图4 2.7 数据字典6 2.8 功能需求 2.8.1 功能模块6 2.8.2 系统主要功能描述7 2.9 性能需求 2.9.1 数据精度7 2.9.2 时间特性7 2.10 运行需求 7 2.11 其他要求 7 第三章、数据库概念结构设计 3.1E-R 图 8 3.1.1 局部 E-R 图 8 3.1.2 总 E-R 图 9 第四章、数据库的逻辑结构设计(详细设计) 4.1 关系模式10 4.2 基本表10 4.3 接口设计12 第五章、系统的实现与调试 5.1 系统流程设计13 第六章 系统的界面设计及源代码 6.1 登陆窗口界面及代码14 6.2 系统主窗口界面15 6.3.住宿管理设计19 6.3.1 住宿登记19 6.3.2 追加押金25 6.3.3 调房登记28 6.3.4 退房结帐31 6.4 客房管理36 6.4.1 客房设置36 6.4.2.客房查询38 6.4.3.房态查看39 6.5 挂帐管理41 6.6 查询统计42 6.6.1.住宿查询42 6.6.2 退宿查询42 6.6.3 宿费提醒43 6.7 日结设计44 6.7.1 客房销售报表44 6.8 系统设置46 6.8.1 操作员设置46 6.8.2 密码设置47 6.8.3 权限设置321 10 . 酒店客房管理系统 系统的界面设计及源代码 6.1 系统登陆窗口界面 Dim TIM As Integer 定义一个整型变量 Dim myval As String 定义一个字符串变量 Private Sub Form_Load() 自动识别数据库路径 Data1.DatabaseName = App.Path & “KFGL.mdb“ Data2.DatabaseName = App.Path & “KFGL.mdb“ End Sub Private Sub Form_Activate() 当记录为零时,进入系统具有所有权限 If Data1.Recordset.RecordCount = 0 Then MsgBox (“请先设置操作员密码和权限!“) Load main main.Show Unload Me Else Text1.SetFocus End If End Sub Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then Text2.SetFocus 按回车键,text2 获得焦点 End Sub Private Sub text2_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then Cmd1.SetFocus 按回车键 cmd1 获得焦点 If KeyCode = vbKeyUp Then Text1.SetFocus If KeyCode = vbKeyDown Then Cmd1.SetFocus End Sub Private Sub cmd1_Click() main.StatusBar1.Panels(4).Text = Text1.Text 赋值给 main.StatusBar1.Panels(4).Text 验证操作员及密码 If Data2.Recordset.BOF = False Then Data2.Recordset.MoveFirst Data2.Recordset.FindFirst “操作员 like “ + Chr(34) + Text1.BoundText + Chr(34) + “ If Data2.Recordset.NoMatch Then MsgBox (“操作员输入错误!“) Else Data1.RecordSource = “select * from qxsz where 操作员=“ & Text1.BoundText & “ Data1.Refresh If Text1.BoundText “ And Text2.Text = Data1.Recordset.Fields(“密码“) Then Load main main.Show Unload Me Else If TIM = 3 Then 密码输错 3 次,退出系统 myval = MsgBox(“密码输入错误,请向系统管理员查询!“, 0, “) If myval = vbOK Then End End If If Text1.BoundText = “ Then MsgBox (“请输入操作员!“) Text1.SetFocus Else If Text1.BoundText Data1.Recordset.Fields(“密码“) Then MsgBox (“密码错误,请重新输入密码!“) TIM = TIM + 1 Text2.SetFocus End If End If End If End If End If End If End Sub Private Sub cmd2_Click() End6.2 系统主程序窗口界面 Private Sub Form_Load() Data1.DatabaseName = App.Path & “Kfgl.MDB“ 自动识别数据库路径 End Sub Private Sub Form_Activate() 设置操作员权限 With Data1.Recordset If .BOF = False Then .MoveFirst .FindFirst “操作员 like “ + Chr(34) + StatusBar1.Panels(4).Text + Chr(34) + “ If .NoMatch Then Else main.zjyj.Enabled = .Fields(“追加押金“) main.zsdj.Enabled = .Fields(“住宿登记“) main.Label1.Enabled = .Fields(“住宿登记“) main.tf.Enabled = .Fields(“退宿登记“) main.Label2.Enabled = .Fields(“退宿登记“) main.tfdj.Enabled = .Fields(“调房登记“) main.kfsz.Enabled = .Fields(“客房管理“) main.kfcx.Enabled = .Fields(“客房查询“) main.ftck.Enabled = .Fields(“房态查看“) main.khjk.Enabled = .Fields(“客户结款“) main.zscx.Enabled = .Fields(“住宿查询“) main.Label3.Enabled = .Fields(“住宿查询“) main.tfcx.Enabled = .Fields(“退宿查询“) main.sftx.Enabled = .Fields(“宿费提醒“) main.Label5.Enabled = .Fields(“宿费提醒“) main.Label4.Enabled = .Fields(“客房销售报表“) main.xstj.Enabled = .Fields(“客房销售统计报表“) main.czysz.Enabled = .Fields(“操作员设置“) main.ma.Enabled = .Fields(“密码设置“) main.csh.Enabled = .Fields(“初始化“) main.qxsz.Enabled = .Fields(“权限设置“) End If End With End Sub Private Sub label1_Click() 调入住宿登记 zsdj_Click End Sub Private Sub label2_Click() 调入退宿结帐 tf_Click End Sub Private Sub Label3_Click() 调入住宿查询 zscx_Click End Sub Private Sub Label4_Click() 调入客房销售报表 xsbb_Click End Sub Private Sub Label5_Click() 调入宿费提醒 sftx_Click End Sub Private Sub label6_Click() End End Sub Private Sub zjyj_Click() 调入追加押金 Load main_zjyj main_zjyj.Show main.Enabled = False End Sub Private Sub tfdj_Click() 调入调房登记 main_tfdj.Show main.Enabled = False End Sub Private Sub tf_Click() 调入退宿结帐 main_tf.Show main.Enabled = False End Sub Private Sub kfsz_Click() 调入客房管理 10 . VB 酒店客房管理系统数据流图+ER 图+功能模块图 main_kfgl.Show main.Enabled = False End Sub Private Sub kfcx_Click() 调入客房查询 main_kfcx.Show main.Enabled = False End Sub Private Sub ftck_Click() 调入房态查看 main_ftcx.Show main.Enabled = False End Sub Private Sub gzcx_Click() 调入挂帐查询 Load main_gzcx main_gzcx.Show main.Enabled = False End Sub Private Sub khjk_Click() 调入客户结款 Load main_khjk main_khjk.Show main.Enabled = False End Sub Private Sub zscx_Click() 调入住宿查询 Load main_zscx main_zscx.Show main.Enabled = False End Sub Private Sub tfcx_Click() 调入退宿查询 Load main_tfcx main_tfcx.Show main.Enabled = False End Sub Private Sub sftx_Click() 调入宿费提醒 Load main_xftx main_xftx.Show main.Enabled = False End Sub Private Sub xsbb_Click() 调入客房销售报表 main_xsbb.Show main.Enabled = False End Sub Private Sub xstj_Click() 调入客房销售统计 main_xstj.Show main.Enabled = False End Sub Private Sub czysz_Click() 调入操作员设置 Load main_czysz main_czysz.Show main.Enabled = False End Sub Private Sub ma_Click() 调入密码设置 main_mmsz.Show main.Enabled = False End Sub Private Sub csh_Click() 调入初始化 main_csh.Show main.Enabled = False End Sub Private Sub qxsz_Click() 调入权限设置 main_qxsz.Show main.Enabled = False End Sub Private Sub tc_Click() End End Sub 6.3 住宿管理设计 6.3.1 住宿登记 Private Sub ZSDJ_Change(Index As Integer) Select Case Index Case 6 ZSDJ(7).Text = Format(Val(ZSDJ(6).Text) * Val(ZSDJ(5).Text), “0.00“) 计算折前宿费 ZSDJ(9).Text = ZSDJ(7).Text 赋值给 ZSDJ(9) ZSDJ(8).Text = 100 DTP3.Value = DTP1.Value + Val(ZSDJ(6).Text) 计算退宿日期 Case 8 ZSDJ(9).Text = Format(Val(ZSDJ(7).Text) * Val(ZSDJ(8).Text) / 100, “0.00“) 计算实际宿费 Case 10 If ZSDJ(10).Text 0.5 * Val(ZSDJ(5).Text) Then tim2.Value = #6:00:00 PM# Else tim2.Value = #12:00:00 AM# End If End If End Select End Sub Private Sub ZSDJ_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer) Select Case Index Case 0 If KeyCode = vbKeyReturn Then Combo1.SetFocus 按回车键 Combo1 获得焦点 Case 1 If KeyCode = vbKeyReturn Then ZSDJ(2).SetFocus 按回车键 ZSDJ(2)获得焦点 Case 2 If KeyCode = vbKeyReturn Then ZSDJ(3).SetFocus 按回车键 ZSDJ(3)获得焦点 Case 3 If KeyCode = vbKeyReturn Then DBCombo1.SetFocus 按回车键 ZSDJ(2)获得焦点 Case 4 If KeyCode = vbKeyReturn Then ZSDJ(5).SetFocus 按回车键 ZSDJ(5)获得焦点 Case 5 SetFocus 按回车键 ZSDJ(10)获得焦点 Case 10 If KeyCode = vbKeyReturn Then ZSDJ(11).SetFocus ZSDJ(11)获得焦点 Case 11 If KeyCode = vbKeyReturn Then Comok.SetFocus 按回车键 Comok 获得焦点 End Select End Sub Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then ZSDJ(1).SetFocus 按回车键 ZSDJ(1)获得焦点 End Sub Private Sub DTP2_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then tim3.SetFocus 按回车键 tim3 获得焦点 End Sub Private Sub DTP3_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then tim4.SetFocus 按回车键 tim4 获得焦点 End Sub Private Sub tim3_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then DTP3.SetFocus 按回车键 DTP3 获得焦点 End Sub Private Sub tim4_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then Text10.SetFocus 按回车键 Text10 获得焦点 End Sub Private Sub DBCombo1_Change() 查询空闲房间信息 Data2.RecordSource = “select * from kf where 房间号=“ & DBCombo1.Text & “and 房态=空房“ Data2.Refresh 查询住宿登记信息 Data1.RecordSource = “select * from djb where 房间号=“ & DBCombo1.Text & “and 标志=1“ Data1.Refresh If Data2.Recordset.RecordCount 0 Then If Data1.Recordset.RecordCount = 0 Then ZSDJ(4).Text = Data2.Recordset.Fields(“房间类型“) 赋值给 ZSDJ(4) ZSDJ(5).Text = Data2.Recordset.Fields(“价格“) 赋值给 ZSDJ(5) Else MsgBox (“此房间已占用或停止使用!“) End If End If End Sub Private Sub DBCombo1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then ZSDJ(5).SetFocus ZSDJ(5)获得焦点 End Sub Private Sub comdj_Click() 查询空闲房间信息 Data2.RecordSource = “select * from kf where 房态=空房“ Data2.Refresh Data3.RecordSource = “select * from kf where 房态=空房“ Data3.Refresh 生成凭证号码 Data1.RecordSource = “select * from djb order by 凭证号码“ Data1.Refresh If Not Data1.Recordset.EOF Then Data1.Recordset.MoveLast If lsph.Text = “ Then bh.Text = Date & “d“ & Format(1, “#000“) If lsph.Text 酒店客房管理系统 VB 源代码 If y1.Text “ Then Data1.Recordset.Fields(“凭证号码“) = bh.Text If ZSDJ(0).Text “ Then Data1.Recordset.Fields(“证件名称“) = Combo1.Text If ZSDJ(1).Text “ Then Data1.Recordset.Fields(“详细地址“) = ZSDJ(2).Text If ZSDJ(3).Text “ Then Data1.Recordset.Fields(“房间号“) = Val(DBCombo1.Text) If ZSDJ(4).Text “ Then Data1.Recordset.Fields(“住宿日期“) = DTP1.Value If tim1.Value “ Then Data1.Recordset.Fields(“客房价格“) = Val(ZSDJ(5).Text) If ZSDJ(6).Text “ Then Data1.Recordset.Fields(“折扣“) = ZSDJ(8).Text If ZSDJ(7).Text “ Then Data1.Recordset.Fields(“结款方式“) = Combo2.Text If ZSDJ(9).Text “ Then Data1.Recordset.Fields(“预收金额“) = Val(ZSDJ(10).Text) If DTP2.Value “ Then Data1.Recordset.Fields(“提醒时间“) = tim2.Value If DTP3.Value “ Then Data1.Recordset.Fields(“退宿时间“) = tim3.Value If ZSDJ(11).Text “ Then myrs1.Fields(“凭证号码“) = bh.Text If ZSDJ(0).Text “ Then myrs1.Fields(“证件名称“) = Combo1.Text If ZSDJ(1).Text “ Then myrs1.Fields(“详细地址“) = ZSDJ(2).Text If ZSDJ(3).Text “ Then myrs1.Fields(“房间号“) = Val(DBCombo1.Text) If ZSDJ(5).Text “ Then myrs1.Fields(“住宿日期“) = DTP1.Value If tim1.Value “ Then myrs1.Fields(“住宿天数“) = ZSDJ(6).Text If Combo2.Text “ Then myrs1.Fields(“折扣“) = ZSDJ(8).Text If ZSDJ(7).Text “ Then myrs1.Fields(“应收宿费“) = ZSDJ(9).Text If ZSDJ(10).Text “ Then myrs1.Fields(“提醒日期“) = DTP2.Value If tim2.Value “ Then myrs1.Fields(“退宿日期“) = DTP3.Value If tim3.Value “ Then myrs1.Fields(“备注“) = ZSDJ(11).Text myrs1.Fields(“日期“) = Date myrs1.Fields(“时间“) = Time myrs1.Fields(“BZ“) = Left(Date, 4) & Right(Left(Date, 7), 2) & Right(Date, 2) & Left(Time, 2) & Left(Right(Time, 5), 2) myrs1.Fields(“标志“) = “1“ 更新记录 myrs1.Update 更新房间状态 Data2.Recordset.FindFirst “房间号 like “ + Chr(34) + DBCombo1.Text + Chr(34) + “ Data2.Recordset.Edit Data2.Recordset.Fields(“房态“) = “入住“ Data2.Recordset.Update 设置控件有效或无效 For i = 0 To 6 ZSDJ(i).Enabled = False Next i ZSDJ(8).Enabled = False: ZSDJ(10).Enabled = False: ZSDJ(11).Enabled = False DBCombo1.Enabled = False: Combo1.Enabled = False End If Comok.Enabled = False: Comprint.Enabled = True: Comdj.Enabled = True Comprint.SetFocus End Sub Private Sub comcancel_Click() 取消操作 F

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论