云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 《HHL酒店管理系统》课程设计报告书V1.0 - 图文

《HHL酒店管理系统》课程设计报告书V1.0 - 图文

  • 62 次阅读
  • 3 次下载
  • 2025/5/4 9:21:01

else

MessageBox.Show(\可以添加!\); }

private void button2_Click(object sender, EventArgs e) {

if (this.textBox1.Text == \ || this.textBox2.Text == \||this.comboBox1.Text==\||this.comboBox2.Text==\) {

MessageBox.Show(\请把楼层、房间号、房价、房间类型填写完整!\); } else {

SqlConnection cnn = myCon.getCon();

string sql = \ + this.textBox1.Text + \ + this.comboBox2.SelectedItem.ToString() + \ + this.textBox2.Text + \ + this.comboBox1.SelectedItem.ToString() + \空房','','','无')\; cnn.Open();

SqlCommand cmd = new SqlCommand(sql, cnn); cmd.ExecuteNonQuery();

MessageBox.Show(\添加成功!\); } }

private void button3_Click(object sender, EventArgs e) {

if (this.textBox1.Text == \ || this.textBox2.Text == \ || this.comboBox1.Text == \ || this.comboBox2.Text == \) {

MessageBox.Show(\请把楼层、房间号、房价、房间类型填写完整!\); } else {

SqlConnection cnn = myCon.getCon();

string sql = \ + this.textBox2.Text + \ + this.comboBox1.SelectedItem.ToString() + \ + this.textBox1.Text + \; cnn.Open();

SqlCommand cmd = new SqlCommand(sql, cnn); cmd.ExecuteNonQuery();

MessageBox.Show(\修改成功!\); } }

- 37 -

private void button4_Click(object sender, EventArgs e) {

SqlConnection cnn = myCon.getCon();

string sql = \ + this.textBox1.Text + \; cnn.Open();

SqlCommand cmd = new SqlCommand(sql, cnn); string rt = (string)cmd.ExecuteScalar(); if (rt != \空房\)

MessageBox.Show(\该房间在使用中\); else if(rt==\空房\) {

string sql1 = \from Room where R_ID='\ + this.textBox1.Text + \;

SqlCommand cmd1 = new SqlCommand(sql1, cnn); cmd1.ExecuteNonQuery();

MessageBox.Show(\删除成功!\); } }

private void button5_Click(object sender, EventArgs e) {

SqlConnection con = myCon.getCon(); DataSet ds = null; con.Open();

StringBuilder sql = new StringBuilder();

sql.Append(\房间号,R_floor as 楼层,R_money as 房价,R_type as 房间类型,R_status as 房间状态,R_intime as 入住时间,R_daoqitime as 退房时间,R_notes as 备注 from Room where R_ID='\ + this.textBox1.Text + \); SqlDataAdapter dapt = new SqlDataAdapter(sql.ToString(), con); ds = new DataSet(); dapt.Fill(ds, \);

dataGridView1.DataSource = ds.Tables[0]; }

private void FrmRoomInf_Load(object sender, EventArgs e) {

SqlConnection con = myCon.getCon(); DataSet ds = null; con.Open();

StringBuilder sql = new StringBuilder();

sql.Append(\房间号,R_floor as 楼层,R_money as 房价,R_type as 房间类型,R_status as 房间状态,R_intime as 入住时间,R_daoqitime as 退房时间,R_notes as 备注 from Room\);

- 38 -

SqlDataAdapter dapt = new SqlDataAdapter(sql.ToString(), con); ds = new DataSet(); dapt.Fill(ds, \);

dataGridView1.DataSource = ds.Tables[0]; } 运行结果:

由右边的显示区可知道一楼总共有八间房,从101——108,现在想添加一间109房。

输入109房号后检测是否存在该房号

- 39 -

系统提示可以添加,确定价格和类型,之后点击“添加”

查询109是否添加到数据库

显示区有109房的添加成功的信息。

7.设计心得

黄健帮心得

HHL酒店管理系统对于我甚至我组员来说比较陌生,因为可能对酒店的业务流程不是很

熟悉,例如一间酒店有很多层,每一层有很多间套房,更大的酒店甚至会有几栋楼层,再如,房间的状态也是要有所考虑的,空房、住房中、维修中等等,因此,要先确定好需求,才可以把系统的功能确定下来。在数据库设计过程中,在约束建立时容易出现错误,这里要必须要理清表间关系。另外,我负责本系统的房间信息管理、房间类型管理、客户信息管理、换房管理等功能。其中房间信息管理,我主要对房间信息的添加、修改、删除和查询等功能进

- 40 -

  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

else MessageBox.Show(\可以添加!\); } private void button2_Click(object sender, EventArgs e) { if (this.textBox1.Text == \ || this.textBox2.Text == \||this.comboBox1.Text==\||this.comboBox2.Text==\) { MessageBox.Show(\请把楼层、房间号、房价、房间类型填写完整!\); } else

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com