计算机科学与技术oracle实习报告.doc_第1页
计算机科学与技术oracle实习报告.doc_第2页
计算机科学与技术oracle实习报告.doc_第3页
计算机科学与技术oracle实习报告.doc_第4页
计算机科学与技术oracle实习报告.doc_第5页
已阅读5页,还剩34页未读 继续免费阅读

下载本文档

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

文档简介

酒店管理系统电气与信息工程学院数据库开发技术课程设计 设 计 题 目: 年 级 专 业: 10 级计算机科学与技术 组 长: 小 组 成 员: 指 导 教 师: 谢艳新、许薇 完 成 日 期: 2013年6月28日 酒店管理系统设计摘 要 随着信息化建设的发展,酒店服务业与国际市场接轨已成为大势所趋,酒店业要迎接这场挑战,就必须提高整体竞争能力,变革酒店的管理模式,提高管理水平。实施信息化建设无疑是实现这一目的的必由之路和明智之举。目前,我国酒店服务业信息化管理的进程缓慢,跟国外的酒店相比管理依然落后。在激烈的酒店业竞争中,如何能把握机会,保持自己的优势,立于不败之地呢?这就需要提供最好的服务,提供最完善的设施和最先进的技术。在信息时代,更重要的是还必须要有一个完善的管理信息系统,便于方便客人以及更好地管理酒店。特别是近年来计算机在我国突飞猛进的发展,越来越多的行业都涉足到这个新兴的领域,而酒店管理由于自身应该和顾客及时快捷紧密联系的特点,更应该乘着这股春风打开酒店管理新的一页,更为酒店管理与国际接轨以及酒店的长足发展打下良好的软件基础。天泉酒店管理系统,它可以借用计算机信息化的优势,方便快捷的实现顾客和管理者的交户,方便管理者在第一时间了解顾客的需求,及时做好应对措施,从而可以使经营者在竞争日益激烈的酒店服务行业中取得优势!关键词:新建,查找,删除,清空,结算AbstractAs the information of the development, hotel services and standards of the international market has become the trend of the times. The hotel industry to meet this challenge, we will have to improve overall competitiveness, reform the hotel management, enhance the management level. Implementation of information technology is to achieve this purpose and the only way to a wise move. At present, Chinas hotel services in the information management process has been slow, with foreign hotel 目 录摘要IAbstractI1 概述- 1 -2 需求分析- 1 -2.1 问题的提出- 1 -2.2 需完成的功能- 1 -2.2.1 - 1 -2.2.2 - 1 -2.2.3 E-R图- 2 -3 数据表- 3 -4 存储过程- 6 -4.1- 6 -4.2- 7 -5 软件功能描述- 9 -5.1 总界面- 9 -5.2 基础设置-客房类型设置- 10 -5.3 基础设置-客房信息设置- 11 -5.4 房态管理- 12 -6 程序代码及控件描述- 12 -6.2 启动界面代码- 12 -6.3父类窗口代码- 20 -结论- 32 -参考文献- 33 -III1 概述1.1 项目背景 软件工程课程设计1.2 编写目的掌握数据库设计原理及相关软件的使用1.3 软件定义 酒店管理系统1.4 开发环境 microsoft visual studio2005 sqlserver 20052 需求分析2.1 问题的提出 酒店行业竞争日益激烈,借助当前流行且功能强大的IT工具来拓展市场,简化操作流程,加快数据保存和数据操作的速度,成为有效管理提出的要求。而且传统的手工操作繁琐,缓慢,已经不能适应现在快速和打容量的要求。2.2 需完成的功能2.2.1 完成预订房,入住登记,消费记账,结帐的功能。2.2.2 能录入房间信息,消费者信息,能够查询管理房间信息,消费信息。2.2.3 E-R图:3 数据表CREATE TABLE dbo.入住单 (入住单号 varchar (36) NOT NULL ,预定单号 varchar (36) NULL ,会员编号 int NULL ,客房类型 varchar (4) NULL ,抵店时间 smalldatetime NULL ,离店时间 smalldatetime NULL ,单据状态 varchar (20) NULL ,入住人数 int NULL ,客房编号 varchar (12) NULL ,客房价格 money NULL ,入住价格 money NULL ,折扣 decimal(4, 2) NULL ,折扣原因 varchar (60) NULL ,是否加床 bit NULL ,加床价格 money NULL ,) ON PRIMARYGOCREATE TABLE dbo.入住单历史 (入住单号 varchar (36) NOT NULL ,预定单号 varchar (36) NULL ,会员编号 int NULL ,客房类型 varchar (4) NULL ,抵店时间 smalldatetime NULL ,离店时间 smalldatetime NULL ,单据状态 varchar (20) NULL ,入住人数 int NULL ,客房编号 varchar (12) NULL ,客房价格 money NULL ,入住价格 money NULL ,折扣 decimal(4, 2) NULL ,折扣原因 varchar (60) NULL ,是否加床 bit NULL ,加床价格 money NULL ,预收款 money NULL ,预定人 varchar (20) NULL ,预定公司 varchar (60) NULL ,联系电话 varchar (40) NULL ,备注 varchar (510) NULL ,操作员 varchar (10) NULL ,业务员 varchar (50) NULL ,早餐 bit NULL ,叫醒 bit NULL ,保密 bit NULL ,vip bit NULL ,电话等级 varchar (20) NULL ,特要说明 varchar (50) NULL ,应收帐款 money NULL ,是否结帐 bit NULL ,结帐金额 money NULL ,结帐日期 smalldatetime NULL ,付款方式 varchar (20) NULL ) ON PRIMARYGOCREATE TABLE dbo.客房信息 (客房编号 varchar (12) NOT NULL ,类型编号 varchar (4) NOT NULL ,楼层编号 int NOT NULL ,额定人数 int NULL ,床数 int NULL ,客房描述 varchar (40) NULL ,备注 varchar (100) NULL ,状态 varchar (4) NULL ,是否可拼房 bit NULL ) ON PRIMARYGOCREATE TABLE dbo.客房类型 (类型编号 varchar (4) NOT NULL ,类型名称 varchar (40) NULL ,价格 money NULL ,拼房价格 money NULL ,可超预定数 decimal(3, 0) NULL ,是否可拼房 bit NULL ) ON PRIMARYGOCREATE TABLE dbo.帐单明细 (帐单编号 int IDENTITY (1, 1) NOT NULL ,入住单号 varchar (36) NOT NULL ,消费内容 varchar (40) NULL ,消费金额 money NULL ,消费时间 smalldatetime NULL ,备注 varchar (80) NULL ) ON PRIMARYGOALTER TABLE dbo.入住单历史 ADD CONSTRAINT FK_入住单历史_客房类型 FOREIGN KEY (客房类型) REFERENCES dbo.客房类型 (类型编号)GOALTER TABLE dbo.客房信息 ADD CONSTRAINT FK_客房信息_客房类型 FOREIGN KEY (类型编号) REFERENCES dbo.客房类型 (类型编号),CONSTRAINT FK_客房信息_楼层信息 FOREIGN KEY (楼层编号) REFERENCES dbo.楼层信息 (楼层编号)GOALTER TABLE dbo.帐单明细 ADD CONSTRAINT FK_帐单明细_入住单 FOREIGN KEY (入住单号) REFERENCES dbo.入住单 (入住单号)GOALTER TABLE dbo.预定单 ADD CONSTRAINT FK_预定单_客房类型 FOREIGN KEY (客房类型) REFERENCES dbo.客房类型 (类型编号)GOALTER TABLE dbo.预定单历史 ADD CONSTRAINT FK_预定单历史_客房类型 FOREIGN KEY (客房类型) REFERENCES dbo.客房类型 (类型编号)GOSET QUOTED_IDENTIFIER ON GOSET ANSI_NULLS ON GO4 存储过程4.1 create proc sf_保存入住单 入住单号varchar(36)asbegin tran- 修改客房信息update 客房信息set 状态=住房 from 客房信息as a, 入住单as b where a.客房编号=b.客房编号and b.入住单号=入住单号- 修改预定单状态update 预定单set 单据状态=入住 from 预定单as a, 入住单as b where a.预定单号=b.预定单号and b.入住单号=入住单号- 将已入住的预定单放入历史insert into 预定单历史select * from 预定单where 单据状态= 入住- 清除已入住预定单delete from 预定单where 单据状态= 入住commitGOSET QUOTED_IDENTIFIER OFF GOSET ANSI_NULLS ON GOSET QUOTED_IDENTIFIER ON GOSET ANSI_NULLS ON GO2.create proc sf_收银退房入住单号varchar(36), 付款方式varchar(20)asbegin tranupdate 入住单set 离店时间= getdate(), 单据状态= 离店,付款方式= 付款方式, 是否结帐=1,结帐日期= getdate() where 入住单号= 入住单号- 设置房态update 客房信息set 状态=空房 from 客房信息as a, 入住单as b where a.客房编号=b.客房编号and b.入住单号=入住单号- 倒入历史insert into 入住单历史select * from 入住单where 入住单号= 入住单号insert into 帐单明细历史select * from 帐单明细where 入住单号= 入住单号delete from 帐单明细where 入住单号= 入住单号- 清除入住单delete from 入住单where 入住单号= 入住单号commitGOSET QUOTED_IDENTIFIER OFF GOSET ANSI_NULLS ON GOSET QUOTED_IDENTIFIER ON GOSET ANSI_NULLS ON GO4.2create proc sf_计算应收帐款入住单号varchar(36)asbegin trandeclare total moneydeclare datecount int- 设置离电时间update 入住单set 离店时间= getdate() where 入住单号= 入住单号- 住店天数select datecount = datediff(dd,抵店时间,getdate()from 入住单where 入住单号= 入住单号- 住店金额select total = 0select total = datecount*(isnull(入住价格,0)+isnull(加床价格,0)from 入住单where 入住单号= 入住单号- 消费金额select total = total + isnull(b.消费金额,0) from(select sum(消费金额) as 消费金额from 帐单明细where 入住单号= 入住单号) as b- 设置应收帐款和结算金额update 入住单set 应收帐款= total, 结帐金额= total - isnull(预收款,0) where 入住单号= 入住单号commitGOSET QUOTED_IDENTIFIER OFF GOSET ANSI_NULLS ON GO5 软件功能描述5.1 总界面5.2 基础设置-客房类型设置可新增修、修改或删除客房,编号由系统自动生成,避免重复。5.3 基础设置-客房信息设置 对客房进行具体设置。状态在这里为只读,不能修改。默认客房状态为空。5.4 房态管理 查看是否有空房,查询到期的房等功能。选择房间后点击更改房间状态来跟新房间状态。6 程序代码及控件描述6.1 用到的控件举例 代码由以上各界面代码构成。用到form ,imagelist,toolbar,datagrid,sqldataadapter,label,textbox,button,statusbar,mainmenu等控件。 6.2 启动界面代码using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;namespace 酒店管理系统/ / Form1 的摘要说明。/ public class MainForm : System.Windows.Forms.Formprivate System.Windows.Forms.MainMenu mainMenu1;private System.Windows.Forms.MenuItem menuItem1;private System.Windows.Forms.MenuItem menuItem2;private System.Windows.Forms.MenuItem menuItem3;private System.Windows.Forms.MenuItem menuItem4;private System.Windows.Forms.MenuItem menuItem5;private System.Windows.Forms.MenuItem menuItem6;private System.Windows.Forms.MenuItem menuItem7;private System.Windows.Forms.MenuItem menuItem8;private System.Windows.Forms.MenuItem menuItem9; private System.Windows.Forms.MenuItem menuItem10; private IContainer components;public MainForm()/ Windows 窗体设计器支持所必需的/InitializeComponent();/ TODO: 在InitializeComponent 调用后添加任何构造函数代码/ / 清理所有正在使用的资源。/ protected override void Dispose( bool disposing )if( disposing )if (components != null) components.Dispose();base.Dispose( disposing );#region Windows 窗体设计器生成的代码/ / 设计器支持所需的方法- 不要使用代码编辑器修改/ 此方法的内容。/ private void InitializeComponent() ponents = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm); this.mainMenu1 = new System.Windows.Forms.MainMenu(ponents); this.menuItem1 = new System.Windows.Forms.MenuItem(); this.menuItem2 = new System.Windows.Forms.MenuItem(); this.menuItem3 = new System.Windows.Forms.MenuItem(); this.menuItem4 = new System.Windows.Forms.MenuItem(); this.menuItem5 = new System.Windows.Forms.MenuItem(); this.menuItem6 = new System.Windows.Forms.MenuItem(); this.menuItem7 = new System.Windows.Forms.MenuItem(); this.menuItem8 = new System.Windows.Forms.MenuItem(); this.menuItem9 = new System.Windows.Forms.MenuItem(); this.menuItem10 = new System.Windows.Forms.MenuItem(); this.SuspendLayout(); / / mainMenu1 / this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem this.menuItem1, this.menuItem4, this.menuItem9, this.menuItem10); / / menuItem1 / this.menuItem1.Index = 0; this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem this.menuItem2, this.menuItem3); this.menuItem1.Text = 基础设置; / / menuItem2 / this.menuItem2.Index = 0; this.menuItem2.Text = 客房类型设置; this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click); / / menuItem3 / this.menuItem3.Index = 1; this.menuItem3.Text = 客房信息设置; this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click); / / menuItem4 / this.menuItem4.Index = 1; this.menuItem4.MenuItems.AddRange(new System.Windows.Forms.MenuItem this.menuItem5, this.menuItem6, this.menuItem7, this.menuItem8); this.menuItem4.Text = 业务管理; / / menuItem5 / this.menuItem5.Index = 0; this.menuItem5.Text = 预定管理; this.menuItem5.Click += new System.EventHandler(this.menuItem5_Click); / / menuItem6 / this.menuItem6.Index = 1; this.menuItem6.Text = 入住管理; this.menuItem6.Click += new System.EventHandler(this.menuItem6_Click); / / menuItem7 / this.menuItem7.Index = 2; this.menuItem7.Text = 消费记帐; this.menuItem7.Click += new System.EventHandler(this.menuItem7_Click); / / menuItem8 / this.menuItem8.Index = 3; this.menuItem8.Text = 收银退房; this.menuItem8.Click += new System.EventHandler(this.menuItem8_Click); / / menuItem9 / this.menuItem9.Index = 2; this.menuItem9.Text = 房态管理; this.menuItem9.Click += new System.EventHandler(this.menuItem9_Click); / / menuItem10 / this.menuItem10.Index = 3; this.menuItem10.Text = 退出系统; this.menuItem10.Click += new System.EventHandler(this.menuItem10_Click); / / MainForm / this.AutoScaleBaseSize = new System.Drawing.Size(6, 14); this.ClientSize = new System.Drawing.Size(792, 573); this.Icon = (System.Drawing.Icon)(resources.GetObject($this.Icon); this.IsMdiContainer = true; this.Menu = this.mainMenu1; this.Name = MainForm; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = 酒店管理系统; this.Load += new System.EventHandler(this.MainForm_Load); this.ResumeLayout(false);#endregion/ / 应用程序的主入口点。/ STAThreadstatic void Main() Application.Run(new MainForm();/-查询MDI子窗体是否存在-private bool checkChildFrmExist(string childFrmName)foreach(Form childFrm in this.MdiChildren)if(childFrm.Name = childFrmName) /用子窗体的Name进行判断,如果存在则将他激活if(childFrm.WindowState = FormWindowState.Minimized)childFrm.WindowState = FormWindowState.Normal;childFrm.Activate();return true;return false;/-显示客房类型管理设置窗体-private void menuItem2_Click(object sender, System.EventArgs e)/通过窗体名称查询该窗体是否已经存在,如存在则显示,否则就新创建一个if (this.checkChildFrmExist(RoomType) = true)return;RoomType newFrm=new RoomType();newFrm.MdiParent = this;newFrm.Show();/-显示客房信息管理设置窗体-private void menuItem3_Click(object sender, System.EventArgs e)/通过窗体名称查询该窗体是否已经存在,如存在则显示,否则就新创建一个if (this.checkChildFrmExist(RoomInfo) = true)return;RoomInfo newFrm=new RoomInfo();newFrm.MdiParent = this;newFrm.Show();/-显示客房预定信息窗体-private void menuItem5_Click(object sender, System.EventArgs e)/通过窗体名称查询该窗体是否已经存在,如存在则显示,否则就新创建一个if (this.checkChildFrmExist(HotelReserve) = true)return;HotelReserve newFrm=new HotelReserve();newFrm.MdiParent = this;newFrm.Show();/-显示入住管理信息窗体-private void menuItem6_Click(object sender, System.EventArgs e)/通过窗体名称查询该窗体是否已经存在,如存在则显示,否则就新创建一个if (this.checkChildFrmExist(HotelArrival) = true)return;HotelArrival newFrm=new HotelArrival();newFrm.MdiParent = this;newFrm.Show();/-显示消费记帐窗体-private void menuItem7_Click(object sender, System.EventArgs e)/通过窗体名称查询该窗体是否已经存在,如存在则显示,否则就新创建一个if (this.checkChildFrmExist(ClientConsume) = true)return;ClientConsume newFrm=new ClientConsume();newFrm.MdiParent = this;newFrm.Show();/-显示收银退房窗体-private void menuItem8_Click(object sender, System.EventArgs e)/通过窗体名称查询该窗体是否已经存在,如存在则显示,否则就新创建一个if (this.checkChildFrmExist(HotelLeave) = true)return;HotelLeave newFrm=new HotelLeave();newFrm.MdiParent = this;newFrm.Show(); /-显示房态图-private void menuItem9_Click(object sender, System.EventArgs e)/通过窗体名称查询该窗体是否已经存在,如存在则显示,否则就新创建一个if (this.checkChildFrmExist(RoomStatus) = true)return;RoomStatus newFrm=new RoomStatus(0);newFrm.MdiParent = this;newFrm.Show();/-退出系统-private void menuItem10_Click(object sender, System.EventArgs e)this.Close(); private void MainForm_Load(object sender, EventArgs e) 6.3父类窗口代码using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Data.SqlClient;namespace hot管理系统/ / ParentForm 的摘要说明。/ public class ParentForm : System.Windows.Forms.Formprotected CurrencyManager cmOrders;/用于数据导航控制protected DataSet dataSet11;protected System.Windows.Forms.GroupBox groupBox1;protected System.Windows.Forms.TextBox txt2;protected System.Windows.Forms.Label label1;protected System.Windows.Forms.Button btnSearch;protected System.Windows.Forms.TextBox txt1;protected System.Windows.Forms.Label label2;protected System.Windows.Forms.TextBox txt3;protected System.Windows.Forms.Label label3;private System.Windows.Forms.ImageList imageList1;protected System.Windows.Forms.ToolBar toolBar1;protected System.Windows.Forms.ToolBarButton tBtnFirst;protected System.Windows.Forms.ToolBarButton tBtnPre;protected System.Windows.Forms.ToolBarButton tBtnNext;protected System.Windows.Forms.ToolBarButton tBtnLast;protected System.Windows.Forms.ToolBarButton tBtnNew;protected System.Windows.Forms.ToolBarButton tBtnEdit;protected System.Windows.Forms.ToolBarButton tBtnDelete;protected System.Windows.Forms.ToolBarButton tBtnSubmit;protected System.Windows.Forms.ToolBarButton tBtnCancel;protected System.Windows.Forms.ToolBarButton tBtnQuit;protected System.Windows.Forms.DataGrid dataGrid1;protected System.Windows.Forms.GroupBox groupBox2;private System.Data.SqlClient.SqlCommand sqlSelectCommand1;private System.Data.SqlClient.SqlC

温馨提示

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

评论

0/150

提交评论