数据库课程设计 - - 宾馆客房信息管理系统33 - 图文 联系客服

发布时间 : 星期四 文章数据库课程设计 - - 宾馆客房信息管理系统33 - 图文更新完毕开始阅读4cf0f21aa300a6c30c229f9a

黑龙江工程学院

四、创建数据库

1)创建数据库,让数据库可以动态增长

create database hotel on

(name=hotel_data,

filename='E:\\hotel.mdf',

size=5mB,maxsize=20mb,filegrowth=10%) log on

(name=hotel_log,

filename='E:\\hotel.ldf',

size=2mb,maxsize=5mb,filegrowth=1mb) go

2)创建PW用户表

use hotel

go

create table pw

(user char (12) not null primary key, Pwd char(8) not null, Power char(1) not null ) go

3)创建客房登记表RoomLogin

create table roomlogin

(rid char (12) not null, Rname char(20) not null primary key, Rtype char(10) not null Rdescribe char(100), Rprice money not null, Rstatue char(8) not null, Ruser char(12) not null,)

go

4)同上创建提醒表Reminder、物品表Gmanage、维修表fix、员工表Empl、帐务表Smanage、客户如住表Cmanage

7

黑龙江工程学院

五、程序以及调试和使用说明

5.1程序登陆界面

[说明:进入登陆界面后,系统会自动加载已有的用户,让用户选择自己的帐户进行登陆,密码 输入三次后关闭窗口;用控件属性设置来实现用户定义的完整性:密码最大长度为8。用户名错误,或密码错误,系统都会对其进行提醒,以达到正确输入,本程序设置一超级用户:admin,权限为1,其他用户的权限均为0。超级用户能对押金进行追加,其他用户必须在超级用户协助下才能完成押金追加] Sql语句:

登陆验证:String sql = \

username = ? and userpass = ? \

if(userName == null || \

errors.add(\ //System.out.println(\ }

if(passWord == null || \ errors.add(\ //System.out.println(\ }

8

黑龙江工程学院

5.2 主面板

[说明:主界面用VB中的MDIForm,多入口提供给用户操作,包括菜单栏、工具栏

(可选择显示和不显示)、侧边栏(可隐藏)、主面板Panel(提供操作员最常用的操作,节约时间),在状态栏可以显示系统时间和当前用户以及需要维修的房间数。实现了所有要求的功能]

[说明:提供两种风格供用户选择。在vb模块里有一函数change(),一变量保存

当前风格类型,当每次show一窗口时,就会调用该函数通过变量判断是显示那种风格]

9

黑龙江工程学院

5.3具体介绍

5.3.1房态查看

[说明:在主面板上的快速入口上点击房态查询,显示当前房间入住图形界面。直观、方便。点击房间能显示在该房间入住过的客户。嵌入的查询语句为:\cnumber,cname,cictype,cicnum,csex,caddress,ctel,cmember,croom,ctype,cprice,cindate,coutdate,cstatue from cmanage where croom='\

Command1(Index).Caption & \,Command1(Index).Caption为当前按下的要查询的房间按钮的名称]

查询信息:String sql = \select * from cmanage where croom= ? and

Command1(Index).Caption = ? And Command1(Index).Caption = ?\;

查询姓名:String sql = \ where croom= ? and

Command1.Caption = ?\;

查询城市:String sql = \? and

Command1.Caption = ?\;

查询地址:String sql = \? and

Command1.Caption = ?\;

查询房间:String sql = \ where croom= ? and

Command1.Caption = ?\;

10