您的当前位置:首页正文

酒店管理系统—计算机毕业设计(论文)

2021-05-17 来源:年旅网
精品文档 欢迎下载

酒店管理系统

摘 要

宾馆管理信息系统面对强大的信息量可以轻松的管理,减少了在管理上面物力和人力,有利于宾馆提高工作效率和宾馆效益。面对庞大的信息量,宾馆在正常运营中需要对客房资源、顾客信息、结算信息进行管理,利用宾馆管理信息系统及时了解保个环节中信息的变更,有利于提高管理的效率.通过这样的系统,可以做到信息的规范管理、需要统计和快速的查询,从而减少在管理方面的工作量。采用Visual Basic6.0程序来编写,一个系统的开发建立数据库是至关重要的。本课题数据库采用的是SQL Server2000,通过建立数据源,VB与后台的数据库连接来运行。

本文从符合操作简单、界面友好、灵活、实用、安全的要求出发,它所完成的主要功能 有以下几个方面:

1)系统部分:主要完成安全权限。

2)客房信息管理部分:主要完成对客房信息及客房标准信息的查询,修改等管理。

3)订房信息管理部分:主要完成订房信息的查询,修改等管理及剩余客房信息查询的管理。

4)结算信息管理部分:主要完成对结算信息的查询,修改,添加等。 论文主要介绍了本课题的开发背景,所要完成的功能和开发的过程。重点的说明了系统设计的重点,设计思想、难点技术和解决方案。

关键词:数据库,Visual Basic6.0,SQL Server2000,客房信息管理

精品文档 欢迎下载

Abtract

The management information system of the hotel faces the strong amount of information, the management that can be light. Reduce the material resources and manpower in managing, help the hotel to improve working efficiency and hotel benefit. Adopt VB6. 0 procedures come to write, it is essential to set up the database in development of a system, subject this SQL Server2000, through set up data source, VB database in backstage supporter is it is it run to come to join

This text operates from according with simply, the interface is friendly , flexible and practical, the demand with high security sets out, the main function that it finishes has the following several respect:

1) Systematic part: Finish the safe authority mainly.

2) Guest rooms of information administrative sections: Finish inquiry , modification of the information of guest room and standard information of guest room ,etc. to manage mainly.

3) Books rooms in the administrative section of information: Finish such management of managing and surplus information inquiry of guest room as the inquiry , modification of information ,etc. to booking rooms mainly.

4) Settlement information administrative sections: Finish inquiry , modification of settlement information , adding ,etc. mainly.

Thesis this introduce copies of development background of subject mainly, course that function develop even that finish wanted. Prove the focal point that the system is designed especially, systematic design philosophy, difficult point technology and solution .

Keyword: The database , Visual Basic 6. 0, SQL server 2000, the management information system of guest room

.

精品文档 欢迎下载

目录

摘 要 ..................................................................................................................................... 1 Abtract ....................................................................................................................................... 2

第1章 概 述 第2章 系统设计 2.1 系统功能分析 2.2系统功能模块分析 第3章 数据库的设计与实现 3.1数据库需求分析 3.2 数据库概念结构设计 3.3 数据库逻辑结构设计 3.4 创建数据库和数据表

3.5 SQL Sserver2000设置与Visual Basic设置 第4章 宾馆客房管理系统的创建 4.1 宾馆客房管理系统主窗体的创建 4.1.1创建工程项目——Hotel-MIS

4.1.2 创建宾馆客房管理系统的主窗体 4.1.3 创建主窗体的菜单 4.1.4 创建公用模块 4.2 系统用户管理模式的创建 4.2.1 用户登陆窗体的创建 4.2.2 添加用户窗体的创建 4.2.3 修改用户密码窗体的创建 4.3 客房标准管理模块的创建 4.3.1 添加客房标准窗体的创建 4.3.2 修改客房标准窗体的创建 4.3.3 删除客房标准 4.4 客房信息管理模块的创建 4.4.1 添加客房信息窗体的创建 4.4.2 修改客房信息 4.4.3 删除客房信息 4.4.4 查询客房信息 4.5 订房信息管理模块的创建 4.5.1 查询剩余客房信息窗体的创建 4.5.2添加订房信息 4.5.3 修改订房信息 4.5.4 查询订房信息 4.6 结算信息管理模块的创建 4.6.1 添加结算信息窗体的创建

精品文档 欢迎下载

4.6.2 修改结算信息 4.6.3 查询结算信息 第5章 系统的实现 第6章 结论 致 谢 参考文献 附 录

精品文档 欢迎下载

1. 绪论

1.1 问题的提出

随着人员流动规模的不断扩大,客房数量的急剧增加,有关客房管理的各种信息量也在不断成倍增长。面对庞大的信息量,就需要有酒店收费管理系统来提高客房管理工作的效率。

传统手工的客房信息管理,管理过程繁琐而复杂,执行效率低,并且易于出错。通过这样的系统,我们可以做到信息的规范管理和快速查询,实现了客房信息管理的系统化、规范化和自动化,这样不仅减少了管理工作量,还提高了管理效率,降低了管理成本。

我父亲正在努力经营着他亲手创建的酒店,我也多次参与酒店的工作,一个酒店管理系统的必切性是非常明确的,我也希望我所编写的程序能给我父亲减轻一点工作压力. 1.2 本文研究路线

本文的研究框架如下图1.1所示,反映了如下的研究思路: 资料查询 开发环境熟悉 定题

调查研究

概要设计

功能模块开发 数据测试 系统运行 系统集成 应用程序打包 图1.1: 本文的研究框架

精品文档 欢迎下载

2. 管理信息系统研究概述

2.1 管理信息系统的发展历史

信息作为生产力中最活跃的因素,很早就在人类经济生活中发挥着不可替代的作用,但把信息纳入企业经营管理系统中高效处理和应用是在计算机发明以后的50年代末。

进入2 0世纪80年代末,随着计算机网络和通信技术的大力发展,企业管理信息系统进入网络化的发展时期。世界发达国家已建立起了完善的先进的管理信息系统体系,在其社会经济发展领域中发挥着巨大的作用。

我国的管理信息系统大发展是在80年代末90年代初,国家相继建立起了“金卡”、“金关”、金桥“工程,多数企事业单位建立了局域网和广域网管理信息系统。随着世界经济和我国经济逐步向知识经济迈进,无论是基于工业经济的管理信息系统,还是面向少数专家和管理人员的专家系统 (ES)或决策支持系统 (DSS),其处理对象和服务对象,自身的系统结构,处理能力,都有了进一步的发展。

2.2 管理信息系统的特点 2.2.1 管理信息系统的组成

管理信息系统在企业中的应用存在三个要素,这就是人、计算机和数据。 人是指企业领导者、管理人员、技术人员,以及MIS建设的领导机构和实施机构,他们在系统中起主导作用。MIS是一项系统工程,不是只靠一些计算机开发人员就可以完成的,必须有企业管理人员,尤其是企业领导的积极参与。 计算机技术是MIS(管理信息系统)得以实施的主要技术。在这些技术中,软件开发是MIS开发的重点。

第三个因素也不能忽视。企业的管理数据是MIS正常运行的基础。广义地说,各项管理制度是MIS建设成功的基础。试想要计算一台机床的成本,需要按时输入每个部件、每个零件以及每个螺钉螺帽的费用,涉及企业的生产车间、采购、库房、工艺设计和财务等多个部门,必须有一整套管理制度作保证。 2.2.2 管理信息系统的界面特点

在计算机软件技术中,人机界面已经发展成为一个重要的分支。MIS人机界面设计一般遵循以下一些基本原则:

精品文档 欢迎下载

1. 以通信功能作为界面设计的核心

人机界面设计的关键是使人与计算机之间能够准确地交流信息。一方面,人向计算机输入信息时应当尽量采取自然的方式:另一方面,计算机向人传递的信息必须准确,不致引起误解或混乱。另外,不要把内部的处理、加工与人机界面混在一起(人机界面程序只是通信),以免互相干扰,影响速度。

设计MIS时,针对每一个功能,都要按照模块化思想,使输入、处理与输出“泾渭分明”,充分体现人机界面的通信功能。这样设计出来的程序不易出错,而且易于维护。

报表打印是MIS必备的功能之一,而且打印之前常常需要计算。计算与打印分开设计,虽然消耗时间,但易于整个MIS系统的维护。 2. 界面必须始终一致

统一的人机界面不至于会增加用户的负担,让用户始终用同一种方式思考与操作。最忌讳的是每换一个屏幕用户就要换一套操作命令与操作方法。

例如在整个系统可以以问号图标表示帮助,以磁盘图标表示存盘,以打印机图标表示打印等。

3. 界面必须使用户随时掌握任务的进展情况

人机界面应该能够告诉用户软件运行的进度。特别是在需要较长时间的等待时,必须让用户了解工作进展情况,如可以设计已经完成了百分之几的任务进度条等。目前,Windows下的应用软件无论大小,其安装程序几乎均做到了这一点。开发MIS软件时,这一点很值得借鉴。 4. 界面友好。使用方便

多数MIS软件的数据输入量较大。对于一些相对固定的数据,不应让用户频频输入(特别是汉字),而应让用户用鼠标轻松选择。例如,人事管理系统中的“文化程度”是相对固定的数据,其值一般取“小学”、“初中”、“高中”、“大专”、“大本”、“硕研”、“博研”等。录入这类数据之前,MIS软件应在相应位置弹出一个列表框,待用户以鼠标点击,而不应让用户每次都输入这些汉字。 总之,所开发的MIS在使用过程中,应使用户的数据输入量降至最低限度减少用户的干预量。实践证明,用户干预愈少,MIS系统的满意程度愈高。 2.3 管理信息系统的开发方式

精品文档 欢迎下载

管理信息系统的开发方式主要有独立开发方式、委托开发方式、合作开发方

式、购买现成软件方式等4种。这4种开发方式各有优点和不足,需要根据使用单位的技术力量、资金情况、外部环境等各种因素进行综合考虑和选择。不论哪种开放方式都需要有单位的领导和业务人员参加,并在管理信息系统的整个开发过程中培养、锻炼、壮大该系统的维护队伍。 2.4 管理信息系统的开发过程

管理信息系统的开发过程一般包括系统开发准备、系统调查、系统分析、系统设计、系统实现、系统转换、系统运行与维护、系统评价等步骤。根据开发系统的大小、复杂、投入、方式、方法等因素的不问,各步骤的要求和内容也不同,用户需要根据实际情况进行取舍和计划。

3. 酒店收费管理系统分析与设计

精品文档 欢迎下载

3.1 酒店收费管理系统功能需求简介

酒店收费管理系统对酒店加强客房信息管理有着极其重要的作用,就一所客房数量较大的酒店来说,它的设计内容非常复杂而且繁多,比如拥有客房信息管理、入住信息管理、预定信息管理等功能,而且设计的模块也很多,比如信息统计模块,报表设计模块,打印输出模块,模糊查询模块等等。

由于本软件主要是为某小型酒店定制开发的,因此针对该酒店客房信息管理的实际工作而言,我们经过了反复地论证,最终确定了酒店收费管理系统的设计方案。该酒店收费管理系统的主要功能如下表所示(见表3.1):

功能模块 住房登记 功 能 客房管理 功 能 可以对房间信息进行增加和编辑,也可以根据房号进行查找 功能列表 对客户信息进行增加、删除和修改。 客户查询可以根据房号、姓名、国籍、住店日期、离店日功 能 表3.1:酒店收费管理系统主要功能表

期等信息对客户信息进行查询

3.2 功能需求描述 3.2.1 住房登记功能

该功能实现了对客户信息的管理。该功能可以对客户信息进行增加、删除和修改。客户信息包括对信客户进行登记,登记内容包括房号、姓名、性别、年龄、国籍、客房级别、住房天数、住店日期、离店日期等。 3.2.2 客房管理功能

该功能实现了对客房信息的管理。该功能可以对客房信息进行增加、删除和修改,并且可以根据房号来查找客房信息。客房信息主要包括客房号、客房级别和是否入住。 3.2.3 客户查询功能

该功能实现了对客户信息的查询。管理人员可以根据房号、姓名、国籍、住

精品文档 欢迎下载

店日期或离店日期对客户信息进行查询,查询到的信息包括房号、姓名、性别、年龄、国籍、客房级别、住房天数、住店日期、离店日期等。

系统功能模块图如图3.1所示

系统主界面 住房登记 客房管理 客户登记 客户登记 客户编辑 客户删除 客房增加 客房编辑 客房删除 客房查询 按房号查询 按姓名查询 按国籍查询 按住店日期查询 按离店日期查询

图3.1功能模块图

3.3 目标系统要求

目标系统应该达到以下要求:

1. 时间经济性。优化逻辑设计与物理设计,使系统运行效率高,反映速度快。

精品文档 欢迎下载

2. 可靠性。能连续准确的处理业务,有较强的容错能力。 3. 可理解性。用户容易理解和使用该系统。

4. 可维护性和适应性。系统应易于修改、易于扩充、易于维护,能够适应业务

不断发展变化的需要。

5. 可用性。目标系统功能齐全,能够完全满足业务需求。

6. 安全保密性。保证系统的物理安全、数据存储和存取的安全与保密、数据传输的安全与保密,做好使用人员的授权管理。 3.4 系统平台选择

选择微软平台作为主导,一方面考虑目前微软的飞速发展,越来越多的企业在规划内部网络时,将微软平台作为首选方案;另一方面从技术角度来讲,微软平台上的应用无论是在开发上,还是在软件的部署上都非常容易,而且性能优越。

操作系统:Windows 98 数据库为:MS Access 2000

开发工具与语言: Visual Basic 6.0中文版 3.5 数据库设计

设计数据库系统时首先应该充分了解用户各个方面的需求,包括现有的以及

将来可能增加的需求。数据库设计一般包括如下几个步骤: 1. 数据库需求分析。 2. 数据库概念结构设计。 3. 数据库概念结构设计。 3.5.1 数据库需求分析

用户的需求具体体现在各种信息的提供、保存、更新和查询等方面,这就要求数据库结构能充分满足各种信息的输出和输入。收集基本数据、数据结构以及数据处理的流程。组成一份详尽的数据字典,为以后的具体设计打下基础。

仔细分析调查有关酒店客房信息需求的基础上,将得到如图3.2所示的本系统所处理数据流程。

客房标准设置 基本信息录入 精品文档 欢迎下载

客房标准信息管理

顾客登记

客房登记 基本信息录入 客房信息管

订房信息输入 订房信息管理 基本信息返回 结算信息输结算信息管理 图3.2 系统数据流程图

针对一般酒店客房管理系统得需求,通过对酒店客房管理工作过程的内容和数据流程分析,设计如下面所示的数据项和数据结构:

1. 客房标准信息,包括的数据项有:标准编号、标准名称、房间面积、 床位数量住房单价、是否有空调、电视、电话、单独卫生间等。

2. 客房信息,包括的数据源有:客房编号、客房种类、客房设置、客房单价、 备注等。

3. 订房信息,包括的数据项有:订房编号、客房编号、客房种类、客房位置、

客房备注信息、顾客姓名、顾客身份证号码、入住时间、折扣、备注等。 4. 结算信息,包括的数据项有:订房编号、客房编号、客房种类、客房位置、

客房备注信息、顾客姓名、顾客身份证号码、入住时间、折扣、结算时间、 备注等。

精品文档 欢迎下载

有了上面的数据结构、数据项和数据流程,我们就能进行下面的数据库设计。 3.5.2 数据概念结构设计

得到上面的数据项和数据结构以后,就可以设计出能够满足用户需求的各种实体,以及他们之间的关系,为以后的逻辑结构设计打下基础。

本程序根据上面的设计规划出的实体由:客房标准信息实体、客房信息实体、订房信息实体、结算信息实体。各个实体具体的描述E-R图如下。

客房标准信息实体E-R图如图3.3所示。

标准编号

客房标准信息实体 客房单价 …… 标准名称 床位数量 图3.3 客房标准信息实体

客房信息实体E-R图如图3.4所示。

客房信息实体

客房单价 精品文档 欢迎下载

客房编号

标准标准 …… 客房位置 图3.4 客房信息实体E-R图

结算信息实体E-R图如图3.5所示。 结算信息实体 客房信息 顾客信息

实体之间关系的E-R图如图3.6所示。

客房标准信息

客房登记

…… 结算金额 结算时间 图3.5结算信息实体E-R图

精品文档 欢迎下载

客房信息管理 订房 结算信息管理 订房信息管理 客房结算 图3.6实体之间关系E-R图

3.5.3 数据库逻辑结构设计

现在需要将上面的数据库概念结构化为MS Access 2000数据库系统所支持的实际数据模型,也就是数据库的逻辑结构。酒店客房管理信息系统数据库中各个表格的设计结果如下面表格所示。每个表格表示在数据库中的一个表。表3.2为物资基本信息表。

表3.2客房标准信息表 列名 数据类型 可否为空 typeid varchar NOT NULL typename varchar NOT NULL area numeric NULL benumbs numeric NULL haircondition varchar NULL htelephone varchar NULL htelevision varchar NULL htoilet varchar NULL price numeric NULL

表3.3为客房信息表格

表3.3 客房信息表格 列名 数据类型 可否为空 roomNO varchar NOT NULL roomtypen varchar NOT NULL roomposition varchar NULL roomprice numeric NULL putup varchar NULL 说明 标准编号 标准名称 房间面积 床位数量 是否有空调 是否有电话 是否有电视 是否有单独卫生间 单价 说明 客房编号 客房种类 客房位置 单价 是否被锁定 精品文档 欢迎下载

roommemo 表3.4为订房信息表 列名 bookno customname customID roomno indata discount inmemo checkdate ammount

text NOT NULL 备注 表3.4订房信息表 数据类型 可否为空 varchar NOT NULL varchar NOT NULL varchar NOT NULL varchar NOT NULL datatime NULL numeric NULL textr NULL datatime NULL numeric NULL 说明 订房编号 顾客姓名 身份证号码 客房编号 入住日期 折扣 备注 结算日期 金额 4. 酒店收费管理系统的功能实现

4.1 系统功能分析

系统开发的总体任务是实现酒店各种信息的系统化、规范化和自动化。

系统功能分析是在系统开发的总体任务的基础上完成的 。这个酒店客房管理信息系统需要完成的功能主要有:

1. 有关客房标准的制定、标准信息的输入、包括标准编号、标准名称、房间面积、床位数量、住房单价、是否有空调、电视机、电话以及单独卫生间

精品文档 欢迎下载

等。

2. 客房标准信息的修改、查询等。

3. 客房基本信息的输入,包括客房编号、客房类型、客房设置、客房单价、备注等。

4. 客房基本信息的查询、修改,包括客房编号、客房类型、客房位置、客房单价、备注等。 5. 剩余客房信息的查询。

6. 结算信息的输入,包括客房编号、客房种类、客房设置、客房单价、顾客姓名、顾客身份证号码、入住日期、折扣、结算日起、备注信息等。 7. 结算信息的修改和查询,包括客房编号、客房种类、客房设置、客房单价、顾客姓名、顾客身份证号码、入住日期、折扣、结算日起、备注信息等。 4.1.1 创建工程项目------Hotel_MIS

启动VisualBasic 6.0后。单击File Project 菜单,在工程模板中选择

Standard EXE,VisualBasic 6.0将自动产生一个Form 窗体,属性都是缺省设置。这里我们删除这个窗体,单击File|Save Project 菜单,将这个工程项目命名为 Hotel_MIS 。

4.1.2 创建酒店客房管理信息系统的主窗体

这个项目我们使用多文档界面,单击工具栏中的ADD MDI Form按钮 ,生成一个窗体。在这个窗体上添加所需的控件,创建好的窗体如图所示。

精品文档 欢迎下载

图 酒店客房管理信息系统主窗体

在主窗体中加入状态栏控件,可以实时的反应系统中的各个状态的变化。状态栏控件需要在通常的属性窗口中设置一般属性,还需要在其特有的弹出式菜单中进行设置。选中状态栏控件,单击鼠标右键,选中Property菜单,然后设置属性。面板1用来显示各种文本信息,面板2用来显示单前日期,面板3用来显示当前时间。

4.1.3 创建主窗体菜单

在主窗体重,单击鼠标右键,选择弹出式菜单重的“Menu Editor”命令,创建如图所示的菜单结构:

主窗体中的菜单结构

4.1.4 用户管理模块主要实现:

1.用户登录界面。

精品文档 欢迎下载

2.修改用户密码。

酒店在运营中需要设置不同的客房标准来适应不同消费水平顾客的需要。对于每个客房标准,有不同的硬件设施和服务。 4.1.5 客房标准管理模块主要实现功能:

添加客房标准;修改客房标准;删除户客房标准。

1. 添加客房标准窗体的创建

选择“客房信息管理设置客房标准添加客房标准”菜单,将出现如图所示的窗体。

精品文档 欢迎下载

添加客房标准窗体

在窗体上放置多个文本框,用来输入客房标准基本信息,多个下拉式文本框选择不同的硬件设施;两个按钮用来确定是否添加客房标准信息;多个标签用来提示文本框中需要输入的内容。这些控件的属性见表,添加客房窗体中各个控件的属性设置。

2. 修改客房标准窗体的创建

选择“客房信息管理|设置客房标准|修改客房标准”菜单,将出现如图所示的窗体,窗体中放置一个表格控件。

精品文档 欢迎下载

客房标准信息记录列表窗体

Option Explicit

'Dim blnStartSelect As Boolean

Private Sub dtgRoomQueryRefresh() With frmQuery.dtgQuery .ClearFields

Set .DataSource = frmMDI.adoQuery '实施绑定 .AllowRowSizing = False '表头宽度设为两行 .HeadLines = 2

'选择方式为整行选中

.MarqueeStyle = dbgHighlightRow '不允许修改(设为只读) .AllowAddNew = False .AllowDelete = False .AllowUpdate = False '第一列标题和宽度

.Columns(0).Caption = \"房间编号\" .Columns(0).Width = 75

.Columns(0).AllowSizing = False '第二列标题和宽度

.Columns(1).Caption = \"房间级别\" .Columns(1).Width = 80

.Columns(1).DataFormat.Type = 5

.Columns(1).DataFormat.TrueValue = \"标准间\" .Columns(1).DataFormat.FalseValue = \"豪华间\" .Columns(1).DataFormat.NullValue = \"未知\" .Columns(1).AllowSizing = False '第三列标题和宽度

.Columns(2).Caption = \"房间类型\" .Columns(2).Width = 80

.Columns(2).DataFormat.Type = 5

.Columns(2).DataFormat.TrueValue = \"单人间\" .Columns(2).DataFormat.FalseValue = \"双人间\" .Columns(2).DataFormat.NullValue = \"未知\" .Columns(2).AllowSizing = False '第四列标题和宽度

.Columns(3).Caption = \"房间价格(元)\" .Columns(3).Width = 80

.Columns(3).AllowSizing = False .Columns(4).Caption = \"状态\"

精品文档 欢迎下载

.Columns(4).Width = 40

.Columns(4).DataFormat.Type = 5

.Columns(4).DataFormat.TrueValue = \"在住\" .Columns(4).DataFormat.FalseValue = \"空房\" .Columns(4).DataFormat.NullValue = \"未知\" .Columns(4).AllowSizing = False End With End Sub

Private Sub dtgQuery_Click()

End Sub

Private Sub txtRoomNo_Change()

OpenTable frmMDI.adoQuery, \"SELECT * FROM Room WHERE (((Room.RoomNo) Like '\" & Trim(txtRoomNo.Text) & \"%\" & \"'))\"

dtgRoomQueryRefresh End Sub

Private Sub txtRoomNo_KeyPress(KeyAscii As Integer)

If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then KeyAscii = 0 End If End Sub

Private Sub Form_Load()

Me.Left = (frmMDI.Width - Me.Width) / 2 Me.Top = (frmMDI.Height - Me.Height) / 2

OpenTable frmMDI.adoQuery, \"select * from Room order by RoomNo,RoomRate\" dtgRoomQueryRefresh Label1.Visible = False txtRoomNo.Visible = False Frame2.Visible = False optRoomNo.Value = False optRoomGrade.Value = False optRoomType.Value = False optRoomStatus.Value = False End Sub

Private Sub Option5_Click() If optRoomGrade.Value Then

OpenTable frmMDI.adoQuery, \"SELECT * From Room where (((Room.RoomGrade)=-1))\" ElseIf optRoomType.Value Then

OpenTable frmMDI.adoQuery, \"SELECT * From Room where (((Room.RoomType)=-1))\" ElseIf optRoomStatus.Value Then

精品文档 欢迎下载

OpenTable frmMDI.adoQuery, \"SELECT * From Room where (((Room.RoomStatus)=-1))\" End If

dtgRoomQueryRefresh End Sub

Private Sub Option6_Click() If optRoomGrade.Value Then

OpenTable frmMDI.adoQuery, \"SELECT * From Room where (((Room.RoomGrade)=0))\" ElseIf optRoomType.Value Then

OpenTable frmMDI.adoQuery, \"SELECT * From Room where (((Room.RoomType)=0))\" ElseIf optRoomStatus.Value Then

OpenTable frmMDI.adoQuery, \"SELECT * From Room where (((Room.RoomStatus)=0))\" End If

dtgRoomQueryRefresh End Sub

Private Sub optRoomStatus_Click() Label1.Visible = False txtRoomNo.Visible = False Frame2.Visible = True

Frame2.Caption = \"房间状态\" Option5.Caption = \"在住\" Option6.Caption = \"空房\" Option5.Value = False Option6.Value = False End Sub

Private Sub optRoomType_Click() Label1.Visible = False txtRoomNo.Visible = False Frame2.Visible = True

Frame2.Caption = \"房间类型\" Option5.Caption = \"单人间\" Option6.Caption = \"双人间\" Option5.Value = False Option6.Value = False End Sub

Private Sub optRoomGrade_Click() Label1.Visible = False txtRoomNo.Visible = False Frame2.Visible = True

Frame2.Caption = \"房间级别\"

精品文档 欢迎下载

Option5.Caption = \"标准间\" Option6.Caption = \"豪华间\" Option5.Value = False Option6.Value = False End Sub

Private Sub optRoomNo_Click() txtRoomNo.Text = \"\" Label1.Visible = True txtRoomNo.Visible = True Frame2.Visible = False SendKeys \"{TAB}\" End Sub

3. 删除客房标准

选择“客房信息管理|设置客房标准|删除客房标准”菜单,将出现记录列表。选择相应记录,单击鼠标右键,选择弹出式菜单,将删除当前记录,

4.1.6客房信息管理模块主要实现功能:

添加客房信息;修改客房信息;删除客房信息;查询客房信息。

1. 添加客房信息窗体的创建

选择“客房信息管理|设置客房信息|添加客房信息”菜单,将出现如图所示的窗体。

添加客房信息窗体

窗体中各个控件属性这里就不一一介绍。将各种文本框放在窗体的框架中,

精品文档 欢迎下载

组成“客房信息”栏。

载入窗体时,将自动添加客房种类信息, Option Explicit

Private Sub dtgRoomRefresh() With frmRoomInfo.dtgRoomInfo '绑定

Set .DataSource = frmMDI.adoRoom .AllowRowSizing = False '表头宽度设为两行 .HeadLines = 2 '选择方式为整行选中

.MarqueeStyle = dbgHighlightRow '不允许修改(设为只读) .AllowAddNew = False .AllowDelete = False .AllowUpdate = False '第一列标题和宽度

.Columns(0).Caption = \"房间编号\" .Columns(0).Width = 60 .Columns(0).AllowSizing = False '第二列标题和宽度

.Columns(1).Caption = \"房间级别\" .Columns(1).Width = 80

.Columns(1).DataFormat.Type = 5

.Columns(1).DataFormat.TrueValue = \"标准间\" .Columns(1).DataFormat.FalseValue = \"豪华间\" .Columns(1).DataFormat.NullValue = \"未知\" .Columns(1).AllowSizing = False '第三列标题和宽度

精品文档 欢迎下载

.Columns(2).Caption = \"房间类型\" .Columns(2).Width = 80

.Columns(2).DataFormat.Type = 5

.Columns(2).DataFormat.TrueValue = \"单人间\" .Columns(2).DataFormat.FalseValue = \"双人间\" .Columns(2).DataFormat.NullValue = \"未知\" .Columns(2).AllowSizing = False '第四列标题和宽度

.Columns(3).Caption = \"房间价格(元)\" .Columns(3).Width = 80 .Columns(3).AllowSizing = False '.Columns(4).Visible = False .Columns(4).Caption = \"状态\" .Columns(4).Width = 40

.Columns(4).DataFormat.Type = 5

.Columns(4).DataFormat.TrueValue = \"在住\" .Columns(4).DataFormat.FalseValue = \"空房\" .Columns(4).DataFormat.NullValue = \"未知\" .Columns(4).AllowSizing = False End With End Sub

Private Sub cmdAddNew_Click() With frmRoomInfoEdit '窗体标题

.Caption = \"添加新客房\" '清空班级编号并设为可修改 .txtRoomNo.Locked = False .txtRoomNo.Text = \"\"

精品文档 欢迎下载

'默认班级类型为第一项

If .cboRoomGrade.ListCount = 0 Then .cboRoomGrade.ListIndex = -1 Else

.cboRoomGrade.ListIndex = 0 End If

'默认教师为第一项

If .cboRoomType.ListCount = 0 Then .cboRoomType.ListIndex = -1 Else

.cboRoomType.ListIndex = 0 End If

.txtRoomRate = \"\" '显示为模式窗体 .Show vbModal End With End Sub

Private Sub cmdDelete_Click() With frmMDI.adoRoom.Recordset

If .EOF <> True And .BOF <> True Then If !RoomStatus Then

MsgBox \"当前房间有客人居住,您不能删除该房间!\vbOKOnly + vbInformation, \"提示\"

Exit Sub End If

If MsgBox(\"确认要删除当前记录吗?\+ vbDefaultButton2, \"确认框\") = vbYes Then

.Delete

精品文档 欢迎下载

dtgRoomInfo.SetFocus End If End If End With Exit Sub End Sub

Private Sub cmdEdit_Click() If

frmMDI.adoRoom.Recordset.EOF

<>

True

frmMDI.adoRoom.Recordset.BOF <> True Then

With frmRoomInfoEdit '窗体标题

.Caption = \"修改客房信息\" '学员编号,设为不可修改

.txtRoomNo.Text = frmMDI.adoRoom.Recordset!RoomNo .txtRoomNo.Locked = True

If frmMDI.adoRoom.Recordset!RoomGrade Then '标准间 .cboRoomGrade.ListIndex = 0 Else '豪华间

.cboRoomGrade.ListIndex = 1 End If

If frmMDI.adoRoom.Recordset!RoomType Then '单人间 .cboRoomType.ListIndex = 0 Else '双人间

.cboRoomType.ListIndex = 1 End If

.txtRoomRate = frmMDI.adoRoom.Recordset!RoomRate .Show vbModal End With End If

And

精品文档 欢迎下载

End Sub

Private Sub cmdExit_Click() '退出窗体 Unload Me End Sub

Private Sub Form_Load() '显示在主窗体的中央

Me.Left = (frmMDI.Width - Me.Width) / 2 Me.Top = (frmMDI.Height - Me.Height) / 4 dtgRoomRefresh End Sub 2. 修改客房信息

选择“客房信息管理|设置客房信息|修改客房信息”菜单,将出现如图所示的

体。

修改客房信息窗体

窗体中放置了一个表格控件,所有客房记录都显示在里面。选择需要修改的记录,在如图1-21所示的弹出式菜单中选择“修改客房信息”,出现图窗体,然后进行修改。

Option Explicit

Private Sub dtgRoomRefresh() With frmRoomInfo.dtgRoomInfo

精品文档 欢迎下载

'绑定

Set .DataSource = frmMDI.adoRoom .AllowRowSizing = False '表头宽度设为两行 .HeadLines = 2 '选择方式为整行选中

.MarqueeStyle = dbgHighlightRow '不允许修改(设为只读) .AllowAddNew = False .AllowDelete = False .AllowUpdate = False '第一列标题和宽度

.Columns(0).Caption = \"房间编号\" .Columns(0).Width = 60

.Columns(0).AllowSizing = False '第二列标题和宽度

.Columns(1).Caption = \"房间级别\" .Columns(1).Width = 80

.Columns(1).DataFormat.Type = 5

.Columns(1).DataFormat.TrueValue = \"标准间\" .Columns(1).DataFormat.FalseValue = \"豪华间\" .Columns(1).DataFormat.NullValue = \"未知\" .Columns(1).AllowSizing = False '第三列标题和宽度

.Columns(2).Caption = \"房间类型\" .Columns(2).Width = 80

.Columns(2).DataFormat.Type = 5

.Columns(2).DataFormat.TrueValue = \"单人间\" .Columns(2).DataFormat.FalseValue = \"双人间\"

精品文档 欢迎下载

.Columns(2).DataFormat.NullValue = \"未知\" .Columns(2).AllowSizing = False '第四列标题和宽度

.Columns(3).Caption = \"房间价格(元)\" .Columns(3).Width = 80

.Columns(3).AllowSizing = False '.Columns(4).Visible = False .Columns(4).Caption = \"状态\" .Columns(4).Width = 40

.Columns(4).DataFormat.Type = 5

.Columns(4).DataFormat.TrueValue = \"在住\" .Columns(4).DataFormat.FalseValue = \"空房\" .Columns(4).DataFormat.NullValue = \"未知\" .Columns(4).AllowSizing = False End With End Sub

Private Sub cmdAddNew_Click() With frmRoomInfoEdit '窗体标题

.Caption = \"添加新客房\" '清空班级编号并设为可修改 .txtRoomNo.Locked = False .txtRoomNo.Text = \"\" '默认班级类型为第一项

If .cboRoomGrade.ListCount = 0 Then .cboRoomGrade.ListIndex = -1 Else

精品文档 欢迎下载

.cboRoomGrade.ListIndex = 0 End If

'默认教师为第一项

If .cboRoomType.ListCount = 0 Then .cboRoomType.ListIndex = -1 Else

.cboRoomType.ListIndex = 0 End If

.txtRoomRate = \"\" '显示为模式窗体 .Show vbModal End With End Sub

Private Sub cmdDelete_Click() With frmMDI.adoRoom.Recordset

If .EOF <> True And .BOF <> True Then If !RoomStatus Then

MsgBox \"当前房间有客人居住,您不能删除该房间!\vbOKOnly + vbInformation, \"提示\"

Exit Sub End If

If MsgBox(\"确认要删除当前记录吗?\vbYesNo + vbQuestion + vbDefaultButton2, \"确认框\") = vbYes Then

.Delete

dtgRoomInfo.SetFocus End If End If

精品文档 欢迎下载

End With Exit Sub End Sub

Private Sub cmdEdit_Click() If

frmMDI.adoRoom.Recordset.EOF

<>

True

And

frmMDI.adoRoom.Recordset.BOF <> True Then

With frmRoomInfoEdit '窗体标题

.Caption = \"修改客房信息\" '学员编号,设为不可修改

.txtRoomNo.Text = frmMDI.adoRoom.Recordset!RoomNo .txtRoomNo.Locked = True

If frmMDI.adoRoom.Recordset!RoomGrade Then '标准间 .cboRoomGrade.ListIndex = 0 Else '豪华间

.cboRoomGrade.ListIndex = 1 End If

If frmMDI.adoRoom.Recordset!RoomType Then '单人间 .cboRoomType.ListIndex = 0 Else '双人间

.cboRoomType.ListIndex = 1 End If

.txtRoomRate = frmMDI.adoRoom.Recordset!RoomRate .Show vbModal End With End If End Sub

精品文档 欢迎下载

Private Sub cmdExit_Click() '退出窗体 Unload Me End Sub

Private Sub Form_Load() '显示在主窗体的中央

Me.Left = (frmMDI.Width - Me.Width) / 2 Me.Top = (frmMDI.Height - Me.Height) / 4 dtgRoomRefresh End Sub 3. 删除客房信息

在客房记录列表中选择记录,然后选择菜单中的“产出房间信息”,将删除当前记录, Option Explicit

Private Sub dtgRoomRefresh() With frmRoomInfo.dtgRoomInfo '绑定

Set .DataSource = frmMDI.adoRoom .AllowRowSizing = False '表头宽度设为两行 .HeadLines = 2 '选择方式为整行选中

.MarqueeStyle = dbgHighlightRow '不允许修改(设为只读) .AllowAddNew = False .AllowDelete = False .AllowUpdate = False '第一列标题和宽度

.Columns(0).Caption = \"房间编号\"

精品文档 欢迎下载

.Columns(0).Width = 60

.Columns(0).AllowSizing = False '第二列标题和宽度

.Columns(1).Caption = \"房间级别\" .Columns(1).Width = 80

.Columns(1).DataFormat.Type = 5

.Columns(1).DataFormat.TrueValue = \"标准间\" .Columns(1).DataFormat.FalseValue = \"豪华间\" .Columns(1).DataFormat.NullValue = \"未知\" .Columns(1).AllowSizing = False '第三列标题和宽度

.Columns(2).Caption = \"房间类型\" .Columns(2).Width = 80

.Columns(2).DataFormat.Type = 5

.Columns(2).DataFormat.TrueValue = \"单人间\" .Columns(2).DataFormat.FalseValue = \"双人间\" .Columns(2).DataFormat.NullValue = \"未知\" .Columns(2).AllowSizing = False '第四列标题和宽度

.Columns(3).Caption = \"房间价格(元)\" .Columns(3).Width = 80

.Columns(3).AllowSizing = False '.Columns(4).Visible = False .Columns(4).Caption = \"状态\" .Columns(4).Width = 40

.Columns(4).DataFormat.Type = 5

.Columns(4).DataFormat.TrueValue = \"在住\" .Columns(4).DataFormat.FalseValue = \"空房\" .Columns(4).DataFormat.NullValue = \"未知\"

精品文档 欢迎下载

.Columns(4).AllowSizing = False End With End Sub

Private Sub cmdAddNew_Click() With frmRoomInfoEdit '窗体标题

.Caption = \"添加新客房\" '清空班级编号并设为可修改 .txtRoomNo.Locked = False .txtRoomNo.Text = \"\" '默认班级类型为第一项

If .cboRoomGrade.ListCount = 0 Then .cboRoomGrade.ListIndex = -1 Else

.cboRoomGrade.ListIndex = 0 End If

'默认教师为第一项

If .cboRoomType.ListCount = 0 Then .cboRoomType.ListIndex = -1 Else

.cboRoomType.ListIndex = 0 End If

.txtRoomRate = \"\" '显示为模式窗体 .Show vbModal End With End Sub

精品文档 欢迎下载

Private Sub cmdDelete_Click() With frmMDI.adoRoom.Recordset

If .EOF <> True And .BOF <> True Then If !RoomStatus Then

MsgBox \"当前房间有客人居住,您不能删除该房间!\vbOKOnly + vbInformation, \"提示\" Exit Sub End If

If MsgBox(\"确认要删除当前记录吗?\vbDefaultButton2, \"确认框\") = vbYes Then .Delete

dtgRoomInfo.SetFocus End If End If End With Exit Sub End Sub

Private Sub cmdEdit_Click() If

frmMDI.adoRoom.Recordset.EOF

<>

True

And

frmMDI.adoRoom.Recordset.BOF <> True Then With frmRoomInfoEdit '窗体标题

.Caption = \"修改客房信息\" '学员编号,设为不可修改

.txtRoomNo.Text = frmMDI.adoRoom.Recordset!RoomNo .txtRoomNo.Locked = True

精品文档 欢迎下载

If frmMDI.adoRoom.Recordset!RoomGrade Then '标准间 .cboRoomGrade.ListIndex = 0 Else '豪华间

.cboRoomGrade.ListIndex = 1 End If

If frmMDI.adoRoom.Recordset!RoomType Then '单人间 .cboRoomType.ListIndex = 0 Else '双人间

.cboRoomType.ListIndex = 1 End If

.txtRoomRate = frmMDI.adoRoom.Recordset!RoomRate .Show vbModal End With End If End Sub

Private Sub cmdExit_Click() '退出窗体 Unload Me End Sub

Private Sub Form_Load() '显示在主窗体的中央

Me.Left = (frmMDI.Width - Me.Width) / 2 Me.Top = (frmMDI.Height - Me.Height) / 4 dtgRoomRefresh End Sub 4. 查询客房信息

选择“客房信息管理|设置客房信息|查询客房信息”菜单,将出现如图所示的窗体。在这里可以按照各种方式以及他们的组合进行查询。

精品文档 欢迎下载

查询客房信息的窗体

Private Sub Command1_Click()

frmQuery.Caption = \"客房信息查询\" frmQuery.Show vbModal End Sub

Private Sub Command2_Click()

frmQueryMoney.Show vbModal End Sub

Private Sub Command3_Click()

frmQueryBenifit.Show vbModal End Sub

Private Sub Form_Load()

Me.Left = (frmMDI.Width - Me.Width) / 2 Me.Top = (frmMDI.Height - Me.Height) / 4 End Sub

4.2 发布应用程序

在Visual Basic的集成开发环境中创建好酒店收费管理系统后,并无意味着全部工作已完成,此时生成的应用程序只能在Visual Basic的集成环境中运行,要想使应用程序能够脱离Visual Basic的集成开发环境,首先要对客房信息管理程序进行编译并且生成.exe或其他类型的文件,然后调用打包和展开向导创建安装程序。

精品文档 欢迎下载

4.2.1编译应用程序

编译客房信息管理程序就是将创建的应用程序以及它的工程文件合并成一个可执行文件。在发布客房信息管理应用程序之前,首先应该使用测试和调试工具对改应用程序进行前面测试,在排除了所有可能的错误后,才可以开始对应用程序进行编译。

编译应用程序的主要目的如下: 使应用程序转入和运行更快; 给发布应用程序作准备; 使用应用程序更安全。

将应用程序进行编译后,Visual Basic将工程中的所有文件进行组织并将这些工程文件转化成一个可执行的文件.exe。

Visual Basic提供APP对象来存储应用程序的有关信息属性,例如,公司名,产品名,版本以及其他相关信息。在设计中,可以通过这些属性来告诉用户一些重要的信息,在应用程序运行时用Visual Basic代码读出这些属性值,也可以在Windows资源管理器中观察应用程序对象的版本信息属性值。右击编译过的.exe文件,然后从快捷菜单中选择“属性”命令打开“属性”对话框的版本标签,就可以看到应用程序的版本信息。

当完成当前工程的APP对象的属性后,就可以编译代码了。Visual Basic6.0支持两种编译格式:P代码和本地代码。选择P代码格式编译的应用程序生成的可执行文件较小,选择本地代码编译的应用程序生成的可执行文件要大的多,但是可执行文件的运行速度比较快。

因此,酒店收费管理系统采用的是本地代码的编译格式。 4.2.2打包应用程序

创建Visual Basic应用程序后,可以将创建的客房信息管理应用程序通过磁盘,关盘,网络等途径自由发布,一般来说,发布应用程序必须经过下面的两个步骤:

1、打包

必须将应用程序文件打包为一个或多个可以部署到选定位置的.cab文件(.cab文件是一种压缩文件),对于某些类型的软件包,还必须为其创建安装程

精品文档 欢迎下载

序。

2、部署

必须将打包的应用程序放置到适当的位置,以便用户来安装应用程序。 可以使用两种工具来打包和发布应用程序: 打包和展开向导(Package and Deployment); Visual Basic安装软件提供的安装工具包。

打包和展开向导通过提供有关如何配置.cab文件的选项,使发布应用程序所包含的许多步骤得以自动运行,这是用户一般所采用的方法。

使用打包和展开向导进行打包的第一个步骤就是选择一个工程,然后单击打包按钮,开始创建一个可以发布的应用程序。

第二步,如果没有编译工程,打包和展开向导会要求编译工程。工程编译完成后,向导询问想制作什么类型的包,我们这里使用向导制作安装程序。当向导完成制作安装包以后,它会自动生成一个带有很多重要信息的报告。 4.2.3发布应用程序的步骤

将酒店收费管理系统打包后,制作安装程序的过程并没有结束,必须将打包后的应用程序发布到一个媒体上,比如软盘,光盘等,发布酒店收费管理系统的主要步骤如下:选择“酒店收费管理系统”这个包,然后指定把这个包发布到指定文件夹中,选择发布的媒体,就可以完成“酒店收费管理系统”的发布工作了。

精品文档 欢迎下载

结论

随着人员流动规模的不断扩大,客房数量的急剧增加,有关客房管理的各种信息量也在不断成倍增长。面对庞大的信息量,就需要有酒店收费管理系统来提高客房管理工作的效率。

传统手工的客房信息管理,管理过程繁琐而复杂,执行效率低,并且易于出错。通过这样的系统,我们可以做到信息的规范管理和快速查询,实现了客房信息管理的系统化、规范化和自动化,这样不仅减少了管理工作量,还提高了管理效率,降低了管理成本。该管理系统,可以有效的减少酒店客房管理的操作量,经过酒店的初步使用,效果还是很显著的.

精品文档 欢迎下载

参考文献

[1]《Visual Basic 6.0数据库开发指南》 王福成、周铁柱、黄淼云等编著 清

华大学出版社 2000年6月第一版 [2]《VB.NET编程实例详解(含盘)》 王华杰编著 中国铁道出版社 2002年

04月第一版

[3]《VB.NET高级编程》 康博译 清华大学出版社 2002年03月第一版 [4]《编程技巧及故障排除即时通 (VB 篇)》 清华天则工作室编著 兵器工业

出版社 2001年02月第一版

[5] 《引人入胜 Install Shield 6.x/VB/VC/Delphi 安装程序设计与制作 (含盘)》

张君编著 上海书店 2000年11月第一版

[6]《VB6.0中文版教程》 新智工作室编著 电子工业出版社 2000年03月第一版

[7]《客房管理系统的设计与实现》孙丽芳,孙敏 山西电子技术 2001年06期 [8]《ACCESS数据库开发实例解析》 作者 刘志铭,孙健鹏 机械工业出版社出版

[9]《软件工程》 闫菲主 编著 中国水利水电出版社 [10]《软件工程导论》张海藩 编著 清华大学出版社

[11]《Delphi面向对象程序设计及应用开发》朱振元 朱承 编著 西安电子科技

大学出版社

[12]《ACCESS开发实例精解》郑沫 编著 北京电子工业出版社 [13]《Delphi数据库程序设计》杨宗志 编著 清华大学出版社

[14]《delphi数据库应用开发技术与实例》张大年,廖智勇,刘剑锋 编著

清华大学出版社

[15]《数据库系统概论》萨师煊 王珊.[M].北京:高等教育出版社,2000.2

精品文档 欢迎下载

They both knew it. And if she hadn't won an ecology essay competition and a prize of places for two aboard Sea Shepherd, neither of them would be here.

She rested her hand on Gary's shoulder and looked at him cheekily. \"You may be a pain in the neck sometimes, but I'm glad you're coming with me.\"

As Southampton slid astern, Sea Shepherd nosed into the thumping waters of the English Channel. At that moment the sun squinted through a crack in the cloud. On the horizon the sky's grey paint was peeling, revealing blue. A good omen?

Gary followed Susan down the companionway. \"See you at dinner,\" he said, before entering the cabin he shared with Norman. As one of the girls, Susan had Vanessa for a room-mate. Next door were Yves and Darren.

Susan hesitated outside her cabin, fiddled with her cardigan, ran a comb through her hair. Then, head held high, she made her entrance. Vanessa wasn't there. Susan relaxed, smiling at herself.

The smile faded fast. She's taken the bottom bunk! I was here first. Susan stared, glared at the fancy nightdress laid out on the pillow. Did she have the nerve to move it? No, not quite.

Fuming, she started to unpack. Sweaters, T-shirts, jeans, shorts and a dress. She yanked open the wardrobe door. A row of eye-catching outfits hung neatly on hangers. \"It's like a fashion store,\" Susan muttered, shoving the hangers aside to make space for her own clothes.

In the bathroom she opened the mirror-fronted cabinet on the wall. It was crammed with bottles and jars. Perfume, shampoo, creams ... Susan slammed the cabinet shut and pulled a face in the glass.

Meanwhile Gary was trying to make friends with Norman. Hard work. Norman proved to be a very serious young man, much given to using long words. Must've swallowed a dictionary, Gary thought. But he kept up the conversation. Then the studious teenager produced a pack of cards and proceeded to do a series of conjuring tricks that made Glly could almost smell his breath-mustard gas and roses. It was a wrong number. Billy hung up. There was a soft drink bottle on the windowsill. Its label boasted that it contained no nourishment whatsoever.

The American fliers turned in their uniforms, became high school kids. And Hitler turned into a baby, Billy Pilgrim supposed. That wasn't in the movie. Billy was extrapolating. Everybody turned into a baby, and all humanity, without exception, conspired biologically to produce two perfect people named Adam and Eve, he supposed.

Billy saw the war movies backwards then forwards-and then it was time to go out into his backyard to meet the flying saucer. Out he went, his blue and ivory feet crushing the wet salad of the lawn. He stopped, took a swig, of the dead champagne. It was like 7-Up. He would not raise his eyes to the sky, though he knew there was a flying saucer from Tralfamadore up there. He would see it soon enough, inside and out, and he would see, too, where it came from soon enough-soon enough.

Overhead he heard the cry of what might have been a melodious owl, but it wasn't a melodious owl. It was a flying saucer from Tralfamadore, navigating in both space and time, therefore seeming to Billy Pilgrim to have come from nowhere all at once. Somewhere a big dog barked.

The saucer was one hundred feet in diameter, with portholes around its rim. The light from the portholes was a pulsing purple. The only noise it made was the owl song. It ca-me down to hover over Billy, and to enclose him in a cylinder of pulsing in purple light. Now there was the sound of a seeming kiss as an airtight hatch in the bottom of the saucer was opened. Down snaked a ladder that was outlined in pretty lights like a Ferris wheel.

Billy's will was paralyzed by a zap gun aimed at him from one of the portholes. It became imperative that he take hold of the bottom rung of the sinuous ladder, which he did. The rung was electrified, so that Billy's hands locked onto it hard. He was hauled into the airlock, and machinery closed the bottom door. Only then did the ladder, wound onto a reel in the airlock, let him go. Only then did Billy's brain start working again.

There were two peepholes inside the airlock-with yellow eyes pressed to them. There was a speaker on the wall. The Tralfamadorians had no voice boxes. They communicated telepathicary. They were able to talk to Billy by means of a computer and a sort of electric organ which made every Earthling speech sound. 'Welcome aboard, Mr. Pilgrim,' said the loudspeaker. 'Any questions?' Billy licked his lips, thought a while, inquired at last: 'Why me? '

That is a very Earthling question to ask, Mr. Pilgrim. Why you? Why us for that matter? Why anything? Because this moment simply is. Have you ever seen bugs trapped in amber?' 'Yes.' Billy in fact, had a paperweight in his office which was a blob of polished amber with three ladybugs embedded in it.

精品文档 欢迎下载

'Well, here we are, Mr. Pilgrim, trapped in the amber of this moment. There is no why.'

They introduced an anesthetic into Billy's atmosphere now, put him to sleep. They carded him to a cabin where he was strapped to a yellow Barca-Lounger which they had stolen from a Sears & Roebuck warehouse. The hold of the saucer was crammed with other stolen merchandise, which would be used to furnish Billy's artificial habitat in a zoo on Tralfamadore. The terrific acceleration of the saucer as it left Earth twisted Billy's slumbering body, distorted his face, dislodged him m time, sent him back to the war. When he regained consciousness, he wasn't on the flying saucer. He was in a boxcar crossing Germany again.

Some people were rising from the floor of the car, and others were lying down. Billy planned to He down, too. It would be lovely to sleep. It was black in the car, and black outside the car, which seemed to be about two miles an hour. The car never seemed to go any faster than that. It was a long time between clicks, between joints in the track. There would be a click, and then a year would go by, and then there would be another click

The train often stopped to let really important trains bawl and hurtle by. Another thing it did was stop on sidings near prisons, leaving a few cars there. It was creeping across all of Germany, growing shorter all the time.

And Billy let himself down oh so gradually now, hanging onto the diagonal cross-brace in the comer in order to make himself seem nearly weightless to those he was joining on the floor. He knew it was important that he made himself nearly ghostlike when lying down. He had forgotten why, but a reminder soon came. 'Pilgrim,' said a person he was about to nestle with, 'is that you?' Billy didn't say anything, but nestled very politely, closed his eyes.

'God damn it' said the person. 'That is you, isn't it?' He sat up and explored Billy rudely with his hands. 'It's you, all right. Get the hell out of here.' Now Billy sat up, too-wretched, close to tears. 'Get out of here! I want to sleep!' 'Shut up,' said somebody else.

'I'll shut up when Pilgrim gets away from here.'

So Billy stood up again, clung to the cross-brace. 'Where can I sleep?' he asked quietly. 'Not with me.'

'Not with me, you son of a bitch,' said somebody else. 'You yell. You kick.' 'I do?'

\"You're God damn right you do. And whimper.' 'I do?'

'Keep the hell away from here., Pilgrim.'

And now there was an acrimonious madrigal, with parts sung in all quarters of the car. Nearly everybody seemingly, had an atrocity story of something Billy Pilgrim had done to him in his sleep. Everybody told Billy Pilgrim to keep the hell away.

So Billy Pilgrim had to sleep standing up, or not sleep at all. And food had stopped coming in through the ventilators, and the days and nights were colder all the time.

On the eighth day, the forty-year-old hobo said to Billy, 'This ain't bad. I can be comfortable anywhere.' 'You can?' said Billy.

On the ninth day, the hobo died. So it goes. His last words were, 'You think this is bad? This ain't bad.'

There was something about death and the ninth day. There was a death on the ninth day in the car ahead of Billy's too. Roland Weary died-of gangrene that had started in his mangled feet. So it goes. Weary, in his nearly continuous delirium, told again and again of the Three Musketeers, acknowledged that he was dying, gave many messages to be delivered to his family in Pittsburgh. Above all, he wanted to be avenged, so he said again and again the name of the person who had killed him. Everyone on the car learned the lesson well. very morning, and polish up the old-fashioned spoons, the fat silver teapot, and the glasses till they shone. Then she must dust the room, and what a trying job that was. Not a speck escaped Aunt March's eye, and all the furniture had claw legs and much carving, which was never dusted to suit. Then Polly had to be fed, the lap dog combed, and a dozen trips upstairs and down to get things or deliver orders, for the old lady was very lame and seldom left her big chair. After these tiresome labors, she must do her lessons, which was a daily trial of every virtue she possessed. Then she was allowed one hour for exercise or play, and didn't she enjoy it?

Laurie came every day, and wheedled Aunt March till Amy was allowed to go out with him, when they walked and rode and had capital times. After dinner, she had to read aloud, and sit still while the old lady slept, which she usually did for an hour, as she dropped off over the first page. Then patchwork or towels appeared, and Amy sewed with outward meekness and inward rebellion till dusk, when she was allowed to amuse herself as she liked till teatime. The evenings were the worst of all, for Aunt March fell to telling long stories about her youth, which were so unutterably dull that Amy was always ready to

精品文档 欢迎下载

go to be, intending to cry over her hard fate, but usually going to sleep before she had squeezed out more than a tear or two.

If it had not been for Laurie, and old Esther, the maid, she felt that she never could have got through that dreadful time. The parrot alone was enough to drive her distracted, for he soon felt that she did not admire him, and revenged himself by being as mischievous as possible. He pulled her hair whenever she came near him, upset his bread and milk to plague her when she had newly cleaned his cage, made Mop bark by pecking at him while Madam dozed, called her names before company, and behaved in all respects like an reprehensible old bird. Then she could not endure the dog, a fat, cross beast who snarled and yelped at her when she made his toilet, and who lay on his back with all his legs in the air and a most idiotic expression of countenance when he wanted something to eat, which was about a dozen times a day. The cook was bad-tempered, the old coachman was deaf, and Esther the only one who ever took any notice of the young lady.

Esther was a Frenchwoman, who had lived with`Madame', as she called her mistress, for many years, and who rather tyrannized over the old lady, who could not get along without her. Her real name was Estelle, but Aunt March ordered her to change it, and she obeyed, on condition that she was never asked to change her religion. She took a fancy to Mademoiselle, and amused her very much with odd stories of her life in France, when Amy sat with her while she got up Madam's laces. She also allowed her to roam about the great house, and examine the curious and pretty things stored away in the big wardrobes and the ancient chests, for Aunt March hoarded like a magpie. Amy's chief delight was an Indian cabinet, full of queer drawers, little pigeonholes, and secret places, in which were kept all sorts of ornaments, some precious, some merely curious, all more or less antique. To examine and arrange these things gave Amy great satisfaction, especially the jewel cases, in which on velvet cushions reposed the ornaments which had adorned a belle forty years ago. There was the garnet set which Aunt March wore when she came out, the pearls her father gave her on her wedding day, her lover's diamonds, the jet mourning rings and pins, the queer lockets, with portraits of dead friends and weeping willows made of hair inside, the baby bracelets her one little daughter had worn, Uncle March's big watch, with the red seal so many childish hands had played with, and in a box all by itself lay Aunt March's wedding ring, too small now for her fat finger, but put carefully away like the most precious jewel of them all. \"Which would Mademoiselle choose if she had her will?\" asked Esther, wo always sat near to watch over and lock up the valuables.

\"I like the diamonds best, but there is no necklace among them, and I'm fond of necklaces, they are so becoming. I should choose this if I might,\" replied Amy, looking with great admiration at a string of gold and ebony beads from which hung a heavy cross of the same.

\"I, too, covet that, but not as a necklace. Ah, no! To me it is a rosary, and as such I should use it like a good catholic,\" said Esther, eyeing the handsome thing wistfully. \"Is it meant to use as you use the string of good-smelling wooden beads hanging over your glass?\" asked Amy.

\"Truly, yes, to pray with. It would be pleasing to the saints if one used so fine a rosary as this, instead of wearing it as a vain bijou.\" \"You seem to take a great deal of comfort in your prayers, Esther, and always come down looking quiet and satisfied. I wish I could.\"

\"If Mademoiselle was a Catholic, she would find true comfort, but as that is not to be, it would be well if you went apart each day to meditate and pray, as did the good mistress whom I served before Madame. She had a little chapel, and in it found solacement for much trouble.\"

\"Would it be right for me to do so too?\" asked Amy, who in her loneliness felt the need of help of some sort, and found that she was apt to forget her little book, now that Beth was not there to remind her of it.

\"It would be excellent and charming, and I shall gladly arrange the little dressing room for you if you like it. Say nothing to Madame, but when she sleeps go you and sit alone a while to think good thoughts, and pray the dear God preserve your sister.\"

Esther was truly pious, and quite sincere in her advice, for she had an affectionate heart, and felt much for the sisters in their anxiety. Amy liked the idea, and gave her leave to arrange the light closet next her room, hoping it would do her good.

\"I wish I knew where all these pretty things would go when Aunt March dies,\" she said, as she slowly replaced the shining rosary and shut the jewel cases one by one. \"To you and your sisters. I know it, Madame confides in me. I witnessed her will, and it is to be so,\" whispered Esther smiling. \"How nice! But I wish she'd let us have them now. Procrastination is not agreeable,\" observed Amy, taking a last look at the diamonds.

\"It is too soon yet for the young ladies to wear these things. The first one who is affianced will have the pearls, Madame has said it, and I have a fancy that the little turquoise ring will be given to you when you go, for Madame approves your good behavior and charming manners.\"

\"Do you think so? Oh, I'll be a lamb, if I can only have that lovely ring! It's ever so much prettier than Kitty Bryant's. I do like Aunt March after all.\" And Amy tried on the blue ring with a delighted face and a firm resolve to earn it.

From that day she was a model of obedience, and the old lady complacently admired the success of her training. Esther fitted up the closet with a little table, placed a footstool before it, and over it a picture taken from one of the shut-up rooms. She thought it was of no great value, but, being appropriate, she borrowed it, well knowing that Madame would never know it, nor care if she did. It was, however, a very valuable copy of one of the famous pictures of the world, and Amy's beauty-loving eyes were never tired of looking up at the sweet face of the Divine Mother, while her tender thoughts of her own were busy at her heart. On the table she laid her little testament and hymnbook, kept a vase always full of the best flowers Laurie brought her, and came every day to `sit alone' thinking good thoughts, and praying the dear God to preserve her sister. Esther had given her a rosary of black beads with a silver cross, but Amy hung it up and did not use it, feeling doubtful as to its fitness for Protestant prayers.

The little girl was very sincere in all this, for being left alone outside the safe home nest, she felt the need of some kind hand to hold by so sorely that she instinctively turned to the strong and tender Friend, whose fatherly love most closely surrounds His little children. She missed her mother's help to understand and rule herself, but having been taught where to look, she did her best to find the way and walk in it confidingly. But Amy was a young pilgrim, and just now her burden seemed very heavy. She tried to forget herself, to keep cheerful, and be satisfied with doing right, though no one saw or praised her for it. In her firsteffort at being very, very good, she decided to make her will, as Aunt March had done, so that if she did fall ill and die, her possessions might be justly and generously divided. It cost her a pang

精品文档 欢迎下载

even to think of giving up the little treasures which in her eyes were as precious as the old lady's jewels.

During one of her play hours she wrote out the important document as well as she could, with some help from Esther as to certain legal terms, and when the good-natured Frenchwoman had signed her name, Amy felt relieved and laid it by to show Laurie, whom she wanted as a second witness. As it was a rainy day, she went upstairs to amuse herself in one of the large chambers, and took Polly with her for company. In this room there was a wardrobe full of old-fashioned costumes with which Esther allowed her to play, and it was her favorite amusement to array herself in the faded brocades, and parade up and down before the long mirror, making stately curtsies, and sweeping her train about with a rustle which delighted her ears. So busy was she on this day that she did not hear Laurie's ring nor see his face peeping in at her as she gravely promenaded to and fro, flirting her fan and tossing her head, on which she wore a great pink turban, contrasting oddly with her blue brocade dress and yellow quilted petticoat. She was obliged to walk carefully, for she had on highheeled shoes, and, as Laurie told Jo afterward, it was a comical sight to see her mince along in her gay suit,

\"Oh, dear, how hard it does seem to take up our packs and go on,\" sighed Meg the morning after the party, for now the holidays were over, the week of merrymaking did not fit her for going on easily with the task she never liked.

\"I wish it was Christmas or New Year's all the time. Wouldn't it be fun?\" answered Jo, yawning dismally.

\"We shouldn't enjoy ourselves half so much as we do now. But it does seem so nice to have little suppers and bouquets, and go to parties, and drive home, and read and rest, and not work. It's like other people, you know, and I always envy girls who do such things, I'm so fond of luxury,\" said Meg, trying to decide which of two shabby gowns was the least shabby.

\"Well, we can't have it, so don't let us grumble but shoulder our bundles and trudge along as cheerfully as Marmee does. I'm sure Aunt March is a regular Old Man of the Sea to me, but I suppose when I've learned to carry her without complaining, she will tumble off, or get so light that I shan't mind her.\"

This idea tickled Jo's fancy and put her in good spirits, but Meg didn't brighten, for her burden, consisting of four spoiled children, seemed heavier than ever. She had not heart enough even to make herself pretty as usual by putting on a blue neck ribbon and dressing her hair in the most becoming way.

\"Where's the use of looking nice, when no one sees me but those cross midgets, and no one cares whether I'm pretty or not?\" she muttered, shutting her drawer with a jerk. \"I shall have to toil and moil all my days, with only little bits of fun now and then, and get old and ugly and sour, because I'm poor and can't enjoy my life as other girls do. It's a shame!\" So Meg went down, wearing an injured look, and wasn't at all agreeable at breakfast time. Everyone seemed rather out of sorts and inclined to croak.

Beth had a headache and lay on the sofa, trying to comfort herself with the cat and three kittens. Amy was fretting because her lessons were not learned, and she couldn't find her rubbers. Jo would whistle and make a great racket getting ready.

Mrs. March was very busy trying to finish a letter, which must go at once, and Hannah had the grumps, for being up late didn't suit her.

\"There never was such a cross family!\" cried Jo, losing her temper when she had upset an inkstand, broken both boot lacings, and sat down upon her hat. \"You're the crossest person in it!\" returned Amy, washing out the sum that was all wrong with the tears that had fallen on her slate.

\"Beth, if you don't keep these horrid cats down cellar I'll have tung at the fireplace, and for a moment she felt as much disappointed as she did long ago, when her little sock fell down because it was crammed so full of goodies. Then she remembered her mother's promise and, slipping her hand under her pillow, drew out a little crimson-covered book. She knew it very well, for it was that beautiful old story of the best life ever lived, and Jo felt that it was a true guidebook for any pilgrim going on a long journey. She woke Meg with a \"Merry Christmas,\" and bade her see what was under her pillow. A green- covered book appeared, with the same picture inside, and a few words written by their mother, which made their one present very precious in their eyes. Presently Beth and Amy woke to rummage and find their little books also, one dove-colored, the other blue, and all sat looking at and talking about them, while the east grew rosy with the coming day.

In spite of her small vanities, Margaret had a sweet and pious nature, which unconsciously influenced her sisters, especially Jo, who loved her very tenderly, and obeyed her because her advice was so gently given.

\"Girls,\" said Meg seriously, looking from the tumbled head beside her to the two little night-capped ones in the room beyond, \"Mother wants us to read and love and mind these books, and we must begin at once. We used to be faithful about it, but since Father went away and all this war trouble unsettled us, we have neglected many things. You can do as you please, but I shall keep my book on the table here and read a little every morning as soon as I wake, for I know it will do me good and help me through the day.\"

Then she opened her new book and began to read. Jo put her arm round her and, leaning cheek to cheek, read also, with the quiet expression so seldom seen on her restless face.

\"How good Meg is! Come, Amy, let's do as they do. I'll help you with the hard words, and they'' explain things if we don't understand,\" whispered Beth, very much impressed by the pretty books and her sisters, example.

\"I'm glad mine is blue,\" said Amy. and then the rooms were very still while the pages were softly turned, and the winter sunshine crept in to touch the bright heads and serious faces with a Christmas greeting. \"Where is Mother?\" asked Meg, as she and Jo ran down to thank her for their gifts, half an hour later.

\"Goodness only knows. some poor creeter came a-beggin', and your ma went straight off to see what was needed. There never was such a woman for givin' away vittles and drink, clothes and firin',\" replied Hannah, who had lived with the family since Meg was born, and was considered by t and stalked out again. These turnovers were an institution, and the girls called them `muffs', for they had no others and found the hot pies very comforting to their hands on cold mornings.

Hannah never forgot to make them, no matter how busy or grumpy she might be, for the walk was long and bleak. The poor things got no other lunch and were seldom home before two.

\"Cuddle your cats and get over your headache, Bethy. Goodbye, Marmee. We are a set of rascals this morning, but we'll come home regular angels. Now then, Meg!\" And Jo tramped away, feeling that the pilgrims were not setting out as they ought to do.

精品文档 欢迎下载

They always looked back before turning the corner, for their mother was always at the window to nod and smile, and wave her hand to them. Somehow it seemed as if they couldn't have got through the day without that, for whatever their mood might be, the last glimpse of that motherly face was sure to affect them like sunshine.

\"If Marmee shook her fist instead of kissing her hand to us, it would serve us right, for more ungrateful wretches than we are were never seen,\" cried Jo, taking a remorseful satisfaction in the snowy walk and bitter wind. \"Don't use such dreadful expressions,\" replied Meg from the depths of the veil in which she had shrouded herself like a nun sick of the world. \"I like good strong words that mean something,\" replied Jo, catching her hat as it took a leap off her head preparatory to flying away altogether. \"Call yourself any names you like, but I am neither a rascal nor a wretch and I don't choose to be called so.\" \"You're a blighted being, and decidedly cross today because

因篇幅问题不能全部显示,请点此查看更多更全内容