计算机科学与技术oracle实习报告

时间:2024.3.31

 

电气与信息工程学院

《数据库开发技术》课程设计

  

         设 计 题 目:   ××                          

         年 级 专 业:   10 级计算机科学与技术         

         组       长:   ××                          

         小 组 成 员:   ××  ××                    

         指 导 教 师:   谢艳新、许薇                 

         完 成 日 期:   20##年6月28日               


 酒店管理系统设计

摘    要

   

随着信息化建设的发展,酒店服务业与国际市场接轨已成为大势所趋,酒店业要迎接这场挑战,就必须提高整体竞争能力,变革酒店的管理模式,提高管理水平。实施信息化建设无疑是实现这一目的的必由之路和明智之举。目前,我国酒店服务业信息化管理的进程缓慢,跟国外的酒店相比管理依然落后。在激烈的酒店业竞争中,如何能把握机会,保持自己的优势,立于不败之地呢?这就需要提供最好的服务,提供最完善的设施和最先进的技术。在信息时代,更重要的是还必须要有一个完善的管理信息系统,便于方便客人以及更好地管理酒店。特别是近年来计算机在我国突飞猛进的发展,越来越多的行业都涉足到这个新兴的领域,而酒店管理由于自身应该和顾客及时快捷紧密联系的特点,更应该乘着这股春风打开酒店管理新的一页,更为酒店管理与国际接轨以及酒店的长足发展打下良好的软件基础。天泉酒店管理系统,它可以借用计算机信息化的优势,方便快捷的实现顾客和管理者的交户,方便管理者在第一时间了解顾客的需求,及时做好应对措施,从而可以使经营者在竞争日益激烈的酒店服务行业中取得优势!

关键词:新建,查找,删除,清空,结算


Abstract

As 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, China's hotel services in the information management process has been slow, with foreign hotel
    


目    录

摘要...................................................................................................................................... I

Abstract............................................................................................................................... I

1 概述............................................................................................................................. - 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 -


1 概述

1.1 项目背景

软件工程课程设计

1.2 编写目的

掌握数据库设计原理及相关软件的使用

1.3 软件定义  酒店管理系统

1.4 开发环境  microsoft visual studio2005 sqlserver 2005


2  需求分析

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 [PRIMARY]

GO

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 ,

     [预收款] [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 [PRIMARY]

GO

CREATE 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 [PRIMARY]

GO

CREATE TABLE [dbo].[客房类型] (

     [类型编号] [varchar] (4) NOT NULL ,

     [类型名称] [varchar] (40) NULL ,

     [价格] [money] NULL ,

     [拼房价格] [money] NULL ,

     [可超预定数] [decimal](3, 0) NULL ,

     [是否可拼房] [bit] NULL

) ON [PRIMARY]

GO

CREATE TABLE [dbo].[帐单明细] (

     [帐单编号] [int] IDENTITY (1, 1) NOT NULL ,

     [入住单号] [varchar] (36) NOT NULL ,

     [消费内容] [varchar] (40) NULL ,

     [消费金额] [money] NULL ,

     [消费时间] [smalldatetime] NULL ,

     [备注] [varchar] (80) NULL

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[入住单历史] ADD

       CONSTRAINT [FK_入住单历史_客房类型] FOREIGN KEY

       (

              [客房类型]

       ) REFERENCES [dbo].[客房类型] (

              [类型编号]

       )

GO

ALTER TABLE [dbo].[客房信息] ADD

       CONSTRAINT [FK_客房信息_客房类型] FOREIGN KEY

       (

              [类型编号]

       ) REFERENCES [dbo].[客房类型] (

              [类型编号]

       ),

       CONSTRAINT [FK_客房信息_楼层信息] FOREIGN KEY

       (

              [楼层编号]

       ) REFERENCES [dbo].[楼层信息] (

              [楼层编号]

       )

GO

ALTER TABLE [dbo].[帐单明细] ADD

       CONSTRAINT [FK_帐单明细_入住单] FOREIGN KEY

       (

              [入住单号]

       ) REFERENCES [dbo].[入住单] (

              [入住单号]

       )

GO

ALTER TABLE [dbo].[预定单] ADD

       CONSTRAINT [FK_预定单_客房类型] FOREIGN KEY

       (

              [客房类型]

       ) REFERENCES [dbo].[客房类型] (

              [类型编号]

       )

GO

ALTER TABLE [dbo].[预定单历史] ADD

       CONSTRAINT [FK_预定单历史_客房类型] FOREIGN KEY

       (

              [客房类型]

       ) REFERENCES [dbo].[客房类型] (

              [类型编号]

       )

GO

SET QUOTED_IDENTIFIER ON

GO

SET ANSI_NULLS ON

GO

4  存储过程

4.1

 create proc sf_保存入住单 @入住单号varchar(36)

as

begin 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 单据状态= '入住'

commit

GO

SET QUOTED_IDENTIFIER OFF

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

SET ANSI_NULLS ON

GO

2.

create proc sf_收银退房@入住单号varchar(36), @付款方式varchar(20)

as

begin tran

     update 入住单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 入住单号= @入住单号

commit

GO

SET QUOTED_IDENTIFIER OFF

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

SET ANSI_NULLS ON

GO

4.2

create proc sf_计算应收帐款@入住单号varchar(36)

as

begin tran

     declare @total money

     declare @datecount int

     -- 设置离电时间

     update 入住单set 离店时间= getdate() where 入住单号= @入住单号

     -- 住店天数

     select @datecount = datediff(dd,抵店时间,getdate())

          from 入住单where 入住单号= @入住单号

     -- 住店金额

     select @total = 0

     select @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 入住单号= @入住单号

commit

GO

SET QUOTED_IDENTIFIER OFF

GO

SET ANSI_NULLS ON

GO

5  软件功能描述

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 酒店管理系统

{

      /// <summary>

      /// Form1 的摘要说明。

      /// </summary>

      public class MainForm : System.Windows.Forms.Form

      {

            private 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 调用后添加任何构造函数代码

                  //

            }

            /// <summary>

            /// 清理所有正在使用的资源。

            /// </summary>

            protected override void Dispose( bool disposing )

            {

                  if( disposing )

                  {

                        if (components != null)

                        {

                              components.Dispose();

                        }

                  }

                  base.Dispose( disposing );

            }

            #region Windows 窗体设计器生成的代码

            /// <summary>

            /// 设计器支持所需的方法- 不要使用代码编辑器修改

            /// 此方法的内容。

            /// </summary>

            private void InitializeComponent()

            {

            this.components = new System.ComponentModel.Container();

            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));

            this.mainMenu1 = new System.Windows.Forms.MainMenu(this.components);

            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

            /// <summary>

            /// 应用程序的主入口点。

            /// </summary>

            [STAThread]

            static 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管理系统

{

      /// <summary>

      /// ParentForm 的摘要说明。

      /// </summary>

      public class ParentForm : System.Windows.Forms.Form

      {

            protected 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.SqlCommand sqlInsertCommand1;

            private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;

            private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;

            protected System.Data.SqlClient.SqlDataAdapter da1;

            private System.ComponentModel.IContainer components;

            public ParentForm()

            {                 //

                  // Windows 窗体设计器支持所必需的

                  //

                  InitializeComponent();

                  //

                  // TODO: 在InitializeComponent 调用后添加任何构造函数代码

                  //

            }

            /// <summary>

            /// 清理所有正在使用的资源。

            /// </summary>

            protected override void Dispose( bool disposing )

            {if( disposing )

                  {if(components != null)

                        {components.Dispose();

                        }

                  }

                  base.Dispose( disposing );

            }

            #region Windows 窗体设计器生成的代码

            /// <summary>

            /// 设计器支持所需的方法- 不要使用代码编辑器修改

            /// 此方法的内容。

            /// </summary>

            private void InitializeComponent()

            {

            this.components = new System.ComponentModel.Container();

            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ParentForm));

            this.groupBox1 = new System.Windows.Forms.GroupBox();

            this.txt2 = new System.Windows.Forms.TextBox();

            this.label1 = new System.Windows.Forms.Label();

            this.btnSearch = new System.Windows.Forms.Button();

            this.txt1 = new System.Windows.Forms.TextBox();

            this.label2 = new System.Windows.Forms.Label();

            this.txt3 = new System.Windows.Forms.TextBox();

            this.label3 = new System.Windows.Forms.Label();

            this.imageList1 = new System.Windows.Forms.ImageList(this.components);

            this.toolBar1 = new System.Windows.Forms.ToolBar();

            this.tBtnFirst = new System.Windows.Forms.ToolBarButton();

            this.tBtnPre = new System.Windows.Forms.ToolBarButton();

            this.tBtnNext = new System.Windows.Forms.ToolBarButton();

            this.tBtnLast = new System.Windows.Forms.ToolBarButton();

            this.tBtnNew = new System.Windows.Forms.ToolBarButton();

            this.tBtnEdit = new System.Windows.Forms.ToolBarButton();

            this.tBtnDelete = new System.Windows.Forms.ToolBarButton();

            this.tBtnSubmit = new System.Windows.Forms.ToolBarButton();

            this.tBtnCancel = new System.Windows.Forms.ToolBarButton();

            this.tBtnQuit = new System.Windows.Forms.ToolBarButton();

            this.dataGrid1 = new System.Windows.Forms.DataGrid();

            this.groupBox2 = new System.Windows.Forms.GroupBox();

            this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();

            this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();

            this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();

            this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();

            this.da1 = new System.Data.SqlClient.SqlDataAdapter();

            this.groupBox1.SuspendLayout();

            ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();

            this.SuspendLayout();

            //

            // groupBox1

            //

            this.groupBox1.Controls.Add(this.txt2);

            this.groupBox1.Controls.Add(this.label1);

            this.groupBox1.Controls.Add(this.btnSearch);

            this.groupBox1.Controls.Add(this.txt1);

            this.groupBox1.Controls.Add(this.label2);

            this.groupBox1.Controls.Add(this.txt3);

            this.groupBox1.Controls.Add(this.label3);

            this.groupBox1.Location = new System.Drawing.Point(0, 40);

            this.groupBox1.Name = "groupBox1";

            this.groupBox1.Size = new System.Drawing.Size(728, 56);

            this.groupBox1.TabIndex = 28;

            this.groupBox1.TabStop = false;

            //

            // txt2

            //

            this.txt2.Location = new System.Drawing.Point(368, 24);

            this.txt2.Name = "txt2";

            this.txt2.Size = new System.Drawing.Size(100, 21);

            this.txt2.TabIndex = 2;

            //

            // label1

            //

            this.label1.Location = new System.Drawing.Point(304, 28);

            this.label1.Name = "label1";

            this.label1.Size = new System.Drawing.Size(64, 16);

            this.label1.TabIndex = 1;

            this.label1.Text = "查询条件";

            //

            // btnSearch

            //

            this.btnSearch.Image = ((System.Drawing.Image)(resources.GetObject("btnSearch.Image")));

            this.btnSearch.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;

            this.btnSearch.Location = new System.Drawing.Point(16, 24);

            this.btnSearch.Name = "btnSearch";

            this.btnSearch.Size = new System.Drawing.Size(72, 23);

            this.btnSearch.TabIndex = 0;

            this.btnSearch.Text = " 搜索";

            //

            // txt1

            //

            this.txt1.Location = new System.Drawing.Point(168, 24);

            this.txt1.Name = "txt1";

            this.txt1.Size = new System.Drawing.Size(100, 21);

            this.txt1.TabIndex = 2;

            //

            // label2

            //

            this.label2.Location = new System.Drawing.Point(104, 28);

            this.label2.Name = "label2";

            this.label2.Size = new System.Drawing.Size(64, 16);

            this.label2.TabIndex = 1;

            this.label2.Text = "查询条件";

            //

            // txt3

            //

            this.txt3.Location = new System.Drawing.Point(571, 24);

            this.txt3.Name = "txt3";

            this.txt3.Size = new System.Drawing.Size(100, 21);

            this.txt3.TabIndex = 2;

            //

            // label3

            //

            this.label3.Location = new System.Drawing.Point(512, 28);

            this.label3.Name = "label3";

            this.label3.Size = new System.Drawing.Size(64, 16);

            this.label3.TabIndex = 1;

            this.label3.Text = "查询条件";

            //

            // imageList1

            //

            this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));

            this.imageList1.TransparentColor = System.Drawing.SystemColors.ControlLightLight;

            this.imageList1.Images.SetKeyName(0, "");

            this.imageList1.Images.SetKeyName(1, "");

            this.imageList1.Images.SetKeyName(2, "");

            this.imageList1.Images.SetKeyName(3, "");

            this.imageList1.Images.SetKeyName(4, "");

            this.imageList1.Images.SetKeyName(5, "");

            this.imageList1.Images.SetKeyName(6, "");

            this.imageList1.Images.SetKeyName(7, "");

            this.imageList1.Images.SetKeyName(8, "");

            this.imageList1.Images.SetKeyName(9, "");

            //

            // toolBar1

            //

            this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {

            this.tBtnFirst,

            this.tBtnPre,

            this.tBtnNext,

            this.tBtnLast,

            this.tBtnNew,

            this.tBtnEdit,

            this.tBtnDelete,

            this.tBtnSubmit,

            this.tBtnCancel,

            this.tBtnQuit});

            this.toolBar1.DropDownArrows = true;

            this.toolBar1.ImageList = this.imageList1;

            this.toolBar1.Location = new System.Drawing.Point(0, 0);

            this.toolBar1.Name = "toolBar1";

            this.toolBar1.ShowToolTips = true;

            this.toolBar1.Size = new System.Drawing.Size(728, 41);

            this.toolBar1.TabIndex = 29;

            this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);

            //

            // tBtnFirst

            //

            this.tBtnFirst.ImageIndex = 0;

            this.tBtnFirst.Name = "tBtnFirst";

            this.tBtnFirst.Text = "首记录";

            this.tBtnFirst.ToolTipText = "首记录";

            //

            // tBtnPre

            //

            this.tBtnPre.ImageIndex = 1;

            this.tBtnPre.Name = "tBtnPre";

            this.tBtnPre.Text = "上一记录";

            this.tBtnPre.ToolTipText = "上一记录";

            //

            // tBtnNext

            //

            this.tBtnNext.ImageIndex = 2;

            this.tBtnNext.Name = "tBtnNext";

            this.tBtnNext.Text = "下一记录";

            this.tBtnNext.ToolTipText = "下一记录";

            //

            // tBtnLast

            //

            this.tBtnLast.ImageIndex = 3;

            this.tBtnLast.Name = "tBtnLast";

            this.tBtnLast.Text = "尾记录";

            this.tBtnLast.ToolTipText = "尾记录";

            //

            // tBtnNew

            //

            this.tBtnNew.ImageIndex = 4;

            this.tBtnNew.Name = "tBtnNew";

            this.tBtnNew.Text = "新增";

            this.tBtnNew.ToolTipText = "新增";

            //

            // tBtnEdit

            //

            this.tBtnEdit.ImageIndex = 5;

            this.tBtnEdit.Name = "tBtnEdit";

            this.tBtnEdit.Text = "修改";

            this.tBtnEdit.ToolTipText = "修改";

            //

            // tBtnDelete

            //

            this.tBtnDelete.ImageIndex = 6;

            this.tBtnDelete.Name = "tBtnDelete";

            this.tBtnDelete.Text = "删除";

            this.tBtnDelete.ToolTipText = "删除";

            //

            // tBtnSubmit

            //

            this.tBtnSubmit.ImageIndex = 7;

            this.tBtnSubmit.Name = "tBtnSubmit";

            this.tBtnSubmit.Text = "提交";

            this.tBtnSubmit.ToolTipText = "提交";

            //

            // tBtnCancel

            //

            this.tBtnCancel.ImageIndex = 8;

            this.tBtnCancel.Name = "tBtnCancel";

            this.tBtnCancel.Text = "取消";

            this.tBtnCancel.ToolTipText = "取消";

            //

            // tBtnQuit

            //

            this.tBtnQuit.ImageIndex = 9;

            this.tBtnQuit.Name = "tBtnQuit";

            this.tBtnQuit.Text = "退出";

            this.tBtnQuit.ToolTipText = "退出";

            //

            // dataGrid1

            //

            this.dataGrid1.CaptionVisible = false;

            this.dataGrid1.DataMember = "";

            this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;

            this.dataGrid1.Location = new System.Drawing.Point(0, 96);

            this.dataGrid1.Name = "dataGrid1";

            this.dataGrid1.ReadOnly = true;

            this.dataGrid1.Size = new System.Drawing.Size(728, 280);

            this.dataGrid1.TabIndex = 30;

            //

            // groupBox2

            //

            this.groupBox2.Location = new System.Drawing.Point(0, 368);

            this.groupBox2.Name = "groupBox2";

            this.groupBox2.Size = new System.Drawing.Size(728, 128);

            this.groupBox2.TabIndex = 31;

            this.groupBox2.TabStop = false;

            //

            // da1

            //

            this.da1.DeleteCommand = this.sqlDeleteCommand1;

            this.da1.InsertCommand = this.sqlInsertCommand1;

            this.da1.SelectCommand = this.sqlSelectCommand1;

            this.da1.UpdateCommand = this.sqlUpdateCommand1;

            //

            // ParentForm

            //

            this.AcceptButton = this.btnSearch;

            this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);

            this.ClientSize = new System.Drawing.Size(728, 502);

            this.Controls.Add(this.groupBox2);

            this.Controls.Add(this.dataGrid1);

            this.Controls.Add(this.toolBar1);

            this.Controls.Add(this.groupBox1);

            this.Name = "ParentForm";

            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;

            this.Text = "ParentForm";

            this.Load += new System.EventHandler(this.ParentForm_Load);

            this.groupBox1.ResumeLayout(false);

            this.groupBox1.PerformLayout();

            ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();

            this.ResumeLayout(false);

            this.PerformLayout();

            }

            #endregion

            //-----------工具栏控制代码-------------

            protected void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)

            {if(e.Button.ToolTipText=="退出")

                  {this.Close();

                  }

                 

                  if (e.Button.ToolTipText == "首记录")

                  {

                        this.dataGrid1.UnSelect(cmOrders.Position); //取消原选中的行

                        cmOrders.Position = 0;

                        this.dataGrid1.Select(cmOrders.Position); //选中当前行

                        this.dataGrid1.CurrentRowIndex = cmOrders.Position; //移动表头指示图标      return;

                        }

                  if (e.Button.ToolTipText == "上一记录")

                  {if (cmOrders.Position >= 0)

                        {this.dataGrid1.UnSelect(cmOrders.Position);

                              cmOrders.Position--;

                              this.dataGrid1.Select(cmOrders.Position);     

                              this.dataGrid1.CurrentRowIndex = cmOrders.Position;

                        }

                        return;

                  }

                  if (e.Button.ToolTipText == "下一记录")

                  {     if (cmOrders.Position <= cmOrders.Count-1)

                        {     this.dataGrid1.UnSelect(cmOrders.Position);

                              cmOrders.Position++;

                              this.dataGrid1.Select(cmOrders.Position);      

                              this.dataGrid1.CurrentRowIndex = cmOrders.Position;

                              }

                        return;

                  }

                  if (e.Button.ToolTipText == "尾记录")

                  {

                        this.dataGrid1.UnSelect(cmOrders.Position);

                        cmOrders.Position = cmOrders.Count-1;

                        this.dataGrid1.Select(cmOrders.Position);      

                        this.dataGrid1.CurrentRowIndex = cmOrders.Position;

                        return;

                  }

                  if(e.Button.ToolTipText=="新增")

                  {                      

                        cmOrders.AddNew();//新增一条记录

                SetDefaultValue();//设置默认值                   

                        SetModifyMode(true);//设置控件只读等属性

                  }

                  if(e.Button.ToolTipText=="修改")

                  {

                        SetModifyMode(true);

                  }

                  if(e.Button.ToolTipText=="删除")

                  {DialogResult result=MessageBox.Show("确认删除?","删除数据",MessageBoxButtons.OKCancel);

                        if(result==DialogResult.OK)

                              if(cmOrders.Count>0)//立即从数据集中删除

                              {cmOrders.RemoveAt(cmOrders.Position);                                                   da1.Update(dataSet11);

                              }

                              else

                                    MessageBox.Show("表中为空,已无可删除数据","提示",MessageBoxButtons.OK,MessageBoxIcon.Error);

                  }

                  if(e.Button.ToolTipText=="提交")

                  {

                        bool canSubmit;

                        canSubmit=this.CheckNotNull();

                        if(canSubmit==false)//有非空值字段为空,不允许提交

                        {

                              return;

                        }

                        cmOrders.EndCurrentEdit();

                        if(dataSet11.GetChanges()!=null)

                        {

                              try

                              {     da1.Update(dataSet11);

                                    SetModifyMode(false);

                              }

                              catch(Exception express)

                              {

                                    MessageBox.Show(express.ToString(),"提示",MessageBoxButtons.OK,MessageBoxIcon.Error);

                                    dataSet11.RejectChanges();

                              }

                        }

                        return;

                  }

                  if (e.Button.ToolTipText == "取消")

                  {

                        try

                        {

                              cmOrders.CancelCurrentEdit();  //取消编辑

                              SetModifyMode(false);

                        }

                        catch(Exception express)

                        {

                              MessageBox.Show(express.ToString(),"提示",MessageBoxButtons.OK,MessageBoxIcon.Error);

                        }

                        return;

                  }                

            }

            //------------控制各个控件的只读属性-----------

            protected virtual void SetModifyMode(bool blnEdit)

            {

                  btnSearch.Enabled=!blnEdit;

            }          

            //--------------供派生窗体重载,设置默认值------------

            protected virtual void SetDefaultValue()

            {

                  return;

            }

                        //------------供派生窗体重载,检查非空字段-----------------

            protected virtual bool CheckNotNull()

            {return(true);

            }

        private void ParentForm_Load(object sender, EventArgs e)

        {

        }

      }

}

                                                   


结    论

酒店兴衰,关键是管理。建设一间现代化的酒店,关键是管理。酒店管理是现代酒店的命脉,管理水平的高低,决定着酒店经营的成败。酒店是企业,同样是要重视管理的工作,加强管理。现代管理者即是财富,当代的管理者更是直接的财富。管理的意义,简单地讲,管就是主事,理就是治事,合起来为主管和治理人与事。
随着中国加入WTO和经济全球化格局的形成,越来越多的人感到21世纪国际酒店的竞争激烈,从设备豪华到价格竞争发展到人才全方位的竞争。要竞争就必须创新。创新,是酒店的生命。商场如战场,成功的管理者及其管理需要刚柔结合。
近年来,随着改革开放步伐的加快和中西方文化的交流与发展,以及中国加入WTO和经济全球化格局的形成,我国人民生活水平显著提高,全社会对餐饮业的需求量也越来越大,伴随着消费着的持续增长,餐饮行业已经成为现代社会中发展最快的行业之一。随着我国经济的快速发展和餐饮业的增多,餐饮业的竞争也越来越激烈。要想在激烈的市场竞争中生存,就必须在经营管理、餐饮服务等方面提高管理意识。而对酒店的经营状况起决定性作用的是对酒店日常营业的管理。如何利用先进的管理手段,提高酒店的管理水平,是对每一家酒店的经营者所面临的重要课题。另外,餐饮行业具有管理复杂、货品繁多、菜品多样、价格多变、折扣灵活、现金量大以及报表需求复杂多样等特点,因此,原有的人工管理方式已不能完全胜任,这就迫切需求标准的、高效率的计算机管理方式引导餐饮行业的发展。
因此,开发一套酒店管理软件成为很有必要的事情,在下面的各章中我们将以开发一套酒店管理系统为例,谈谈其开发过程和所涉及到的问题及解决方法。

                                            


参 考 文 献

 [1]《软件工程》,Ian Sommerville著,程成 陈霞 译,机械工业出版社

[2]《文档的作用与分类及各种文档编写摸板》  何彪 著

[3]《数据库系统概论》 王珊 萨师煊 著,高等教育出版社

[4]《Beginning Visual C# 2005》Karli Watson Christian Nagel 等著

要求:各组用A4纸打印一份,左侧装订,每组把报告和程序完整版刻盘

      题目自拟

更多相关推荐:
计算机科学与技术实习报告

目录一实习计划1二实习目的1三实习内容2四实习日志3五实习总结6六致谢7七实习单位评语7八成绩评定8一实习计划3月01日详细了解实习内容和时间明确实习期间所要完成的任务进一步修订计划表3月04日安装思科路由器交...

计算机科学与技术专业毕业实习报告

计算机学院本科毕业实习报告院系计算机学院专业班级09计算机科学与技术3班学生姓名成绩指导老师提交日期

计算机科学与技术毕业实习报告

合肥恒世信息技术有限公司实习报告实习目的实习是实施教学计划的重要组成部分在计算机专业的教学中毕业实习是一个重要的实践性教学环节对学生能力的培养和教学质量的提高起着重要的作用通过实习实践使学生拓宽视野巩固和运用所...

计算机科学与技术 毕业实习报告

新疆财经大学计算机科学与工程学院毕业实习报告学号20xx101784姓名吴慧班级061班实习单位石河子市科技咨询服务中心实习时间20xx年3月8日至20xx年4月23日指导教师杨晓梅二一年四月一实习内容1实习目...

计算机科学与技术认识实习报告

计算机科学与技术认识实习报告学院:海南大学三亚学院专业:计算机科学与技术学号:1010711015姓名:李媛媛一:认知实习目的计算机科学与技术专业10级学生在学校对计算机理论方面的知识有了初步的了解,为了增加学…

计算机科学与技术实习报告

计算机科学与技术实习报告数据库开发学院:Xx工程学院学生:Xx系别:计算机与信息科学系专业:计算机科学与技术班级:Xx学号:5215215211.实习名称:数据库开发2.实习目的通过在技术开发部门的学习了解公司…

计算机科学与技术专业见习报告模板

计算机科学与技术专业见习报告学生姓名学号系别计算机系专业网络工程班级10级3班指导教师胡德斌20xx年5月1日计算机科学与技术专业见习报告20xx级3班xxx姓名见习时间20xx年4月22日4月28日见习单...

计算机科学与技术毕业实习报告

河北建筑工程学院毕业实习报告系别计算机系专业计算机科学与技术班级计062姓名朱海发学号11实习日期20xx3120xx326实习周数4周实习地点张家口电子市场实习单位张家口市腾达电脑网络公司指导教师刘建臣职称教...

计算机科学与技术专业实习报告

计算机科学与技术专业实习报告实习单位蒙自宏远电脑经营部院系工学院专业计算机科学与技术学生姓名学号日期指导教师计算机科学与技术专业实习报告了正式的上岗首先师傅给我讲解大概的电脑安装顺序电脑安装主要是主机的安装各个...

20xx届计算机科学与技术专业毕业实习大纲及指导书

毕业实习大纲与实习指导书20xx届计算机科学与技术专业福建农林大学计算机与信息学院目录毕业实习大纲3一实习名称3二实习总周数学分数3三实习目的及任务要求3四面向专业4五考核方式4六实习指导书7七参考实习项目7八...

计算机科学与技术专业10级实习报告

河北北方学院计算机科学与技术专业10级实习报告学生姓名学号报告题目平时成绩百分制考核成绩百分制总成绩指导教师签名实习单位盖章实习内容及自我鉴定1

计算机科学与技术专业实习报告模板(生产、专业实习、C语言实训)20xx版--1350423

防灾科技学院实习报告书防灾科技学院灾害信息工程系20xx年制六实习内容及步骤3000字左右1管理系统11系统开发思路需求分析300字左右12数据结构设计500字左右将使用的每个对象的结构体类型给出13系统设计与...

计算机科学与技术实习报告(31篇)