软件工程课程设计(酒店管理系统)

合集下载

.net酒店管理系统-实训报告

.net酒店管理系统-实训报告

石家庄科技信息职业学院C#程序设计课程设计(实训)报告系部信息工程系专业计算机软件专业班级学号 _ _ 姓名 ___ _____课题酒店管理系统指导教师报告成绩______________起讫日期: 年月日至年月日摘要在我作为大学生的最后一个学期里,有这么一个实训机会让我更透彻的体会到C#三层开发应用框架的妙处,从而深刻理解这3个框架的详细应用形成一个统一的架构进行WEB开发,使系统层次划分更为清晰,减少了系统冗余代码大大增加了项目的可扩展性,降低了维护成本,提高系统开发效率,为我之后的实习工作提供了很大的帮助。

通过我们自己来做的个人论坛小项目来体会和实践来体验三层开发的优越性,也有助于我们对三层开发的进一步了解。

软件架构是软件工程中最重要的一环,是系统架构师从高层看问题的集合,对整个软件功能的抽象。

一个好的架构有利于系统的分层设计、并行开发、降低模块之间的耦合、提高模块本身的内聚.良好的架构设计,对整个软件项目的开发起着非常重要的指导作用。

【关键词】:三层结构、组件、visual studio 、SQL2005。

目录一、前言。

.。

.。

.。

.。

..。

.。

.。

.。

.。

.。

.。

.。

.。

.。

.。

..。

.。

.。

4二、正文。

....。

.。

.。

.。

..。

..。

.。

..。

..。

.。

.。

...。

.。

.。

..。

.52.1系统需求分析。

.。

.。

.。

..。

..。

..。

.。

.。

.。

.。

.52。

2数据库分析。

...。

...。

.。

..........。

.。

.。

...。

.。

.。

.。

.。

.5 2。

2。

1关系模型。

.。

.。

.。

...。

.。

.。

..。

.。

.。

.。

..。

.。

..。

.。

.。

.. (5)2。

2.2关系表.。

.。

.。

..。

....。

.。

.。

.。

.。

.。

...。

.。

..。

.。

..52。

1详细设计。

..。

..。

.。

..。

.。

.。

.。

..。

...。

..。

.。

..。

.。

(5)2。

1系统需求分析.。

.。

.。

.。

.。

.。

.。

...。

酒店信息管理系统软件工程设计说明有图

酒店信息管理系统软件工程设计说明有图

x x x大学软件详细设计说明书项目名称:酒店信息管理系统实验课程:年级:专业:班级:学号:姓名:指导教师:目录一、绪论························1.1开发背景····················1.2系统调查····················1.3 项目开发的意义·················二、系统需求分析····················2.1 需求问题模块划分················2.1.1系统维护模块···············2.1.2用户需求模块···············2.1.3系统功能需求模块·············2.2 酒店管理系统主要数据流图及数据字典·······2.2.1酒店管理系统的主要数据流图··········三、数据库设计·····················3.1 数据库管理系统的选择··············3.2 数据库系统设计·················四、系统设计与实现···················4.1 三层架构在系统设计过程中的应用·········4.2 主要运行界面及功能代码·············4.2.1 顾客入驻信息登记实现界面·········4.2.2 顾客入驻信息登记实现界面·········4.2.3 顾客信息查询实现界面···········4.2.2房间信息管理实现界面···········五、系统测试······················5.1 程序调试····················5.2 程序的测试···················5.2.1 测试的重要性及目的············5.2.2 测试的步骤················5.2.3 测试的主要内容··············六、总结························一、绪论1.1开发背景随着物质水平逐步提高,精神生活也开始趋向丰富多彩。

酒店信息管理系统软件工程设计说明(有图)

酒店信息管理系统软件工程设计说明(有图)

酒店信息管理系统软件工程设计说明(有图)xxx大学软件详细设计说明书项目名称:酒店信息管理系统实验课程:年级:专业:班级:学号:姓名:指导教师:目录一、绪论···································································错误!未定义书签。

1.1开发背景·······················································错误!未定义书签。

软件工程课程设计-宾馆信息管理系统-参考模板

软件工程课程设计-宾馆信息管理系统-参考模板

分类号编号华北水利水电大学North China University of Water Resources and Electric Power实验报告课程:软件工程实验项目2:软件编码与测试题目:宾馆管理信息系统院系信息工程学院专业计算机科学与技术班级学号201415717姓名李卫朋指导教师庄晋林2017年5 月29 日华北水利水电大学软件工程实验报告2016~2017学年第二学期2014 级计算机科学与技术专业一、实验内容:宾馆管理信息系统任务:入住或预订客房时,用户要对客户管理模块或预订管理模块进行核对审查,并进行登记;客户换房时,要对换房信息进行查询和更新;客户退房时,要进行结算,并对更新客房信息。

主要功能模块:(1)登录模块:对用户身份进行验证,只有合法用户才能进入系统;(2)系统管理模块:对系统用户进行管理,更改用户名、密码、权限等;(3)客房管理模块:对客房信息的添加、修改和删除等;(4)入住管理模块:对客户入住信息的登记、查询等功能(5)订房管理模块:对客户订房信息的登记、查询等。

(6)换房管理模块:对客户换房信息的登记、查询等(7)宾馆结算模块:对已入住宾馆的顾客进行结算及对订房客户已交的押金进行结算、查询。

二、程序源:Win7 64位电脑,vs2012编辑环境,sql2005数据库。

程序源码:1、登录设计:namespace宾馆管理信息系统{public partial class login1 : Form{public login1(){InitializeComponent();}private connection c = new connection();private void button1_Click(object sender, EventArgs e){if(textBox1.Text.Trim().ToString()!= String.Empty && textBox2.Text.Trim().ToString() != String.Empty) {string id = null, pw = null, gd = null;var result = from info in c.linq.loginwhere info.id == textBox1.Text.ToString().Trim()select new{ID = info.id,pw = info.password,gd = info.grade,};if (result.Count() == 0){MessageBox.Show("用户名不存在!");}else if (result.Count() == 1){foreach (var p in result){id = p.ID;pw = p.pw;gd = p.gd;}if (pw.Trim() == textBox2.Text.ToString().Trim()){this.Hide();manger lf = new manger(gd,textBox1.Text.Trim().ToString()); lf.Show();}else{MessageBox.Show("密码错误!");}}}else{MessageBox.Show("不能为空!");}}private void button2_Click(object sender, EventArgs e){this.Close();}private void login1_FormClosed(object sender, FormClosedEventArgs e){System.Environment.Exit(0);}}}2、添加住户设计namespace宾馆管理信息系统{public partial class addpeople : Form{private connection c = new connection();private string s;public addpeople(Form f,string s){this.Owner = f;InitializeComponent();this.s = s;//房间号comboBox1.DropDownStyle = boBoxStyle.DropDownList;}private void button1_Click(object sender, EventArgs e){if (textBox1.Text.Trim().ToString() != String.Empty && comboBox1.Text.Trim().ToString() != String.Empty && textBox3.Text.Trim().ToString() != String.Empty && textBox4.Text.Trim().ToString() != String.Empty){var result = from info in c.linq.roomwhere info.房间号码 == s.Trim().ToString()select new{房间号 = info.房间号码,房间类型 = info.房间种类,房间单价 = info.房间单价,房间是否使用 = info.房间是否正在使用,};foreach (var item in result){if (item.房间单价 <= int.Parse(textBox4.Text.Trim().ToString())){try{guest r = new guest();{r.住店人身份证号码 = textBox1.Text.Trim().ToString();r.姓名 = textBox2.Text.Trim().ToString();r.性别 = comboBox1.Text.Trim().ToString();r.所交押金 = int.Parse(textBox4.Text.Trim().ToString());r.人数 = textBox3.Text.Trim().ToString();r.房间号码 = s;r.入住天数 = 1;r.入住时间 = System.DateTime.Now.Day.ToString();}var edit = c.linq.room.SingleOrDefault<room>(s1 => s1.房间号码 == s.Trim().ToString());if (edit == null){return;}edit.房间是否正在使用 = "是";c.linq.guest.InsertOnSubmit(r);c.linq.SubmitChanges();//修改student的属性;MessageBox.Show(textBox2.Text.Trim().ToString() + " 入住成功");this.Close();}catch{MessageBox.Show("用户已存在!");}}else{MessageBox.Show("所交押金不足!");}}}else{MessageBox.Show("不能为空!");}}private void addpeople_FormClosed(object sender, FormClosedEventArgs e){this.Owner.Owner.Show();}}}3、添加房间设计:namespace宾馆管理信息系统{public partial class addroom : Form{public addroom(Form f){InitializeComponent();this.Owner = f;comboBox1.DropDownStyle = boBoxStyle.DropDownList;}private connection c = new connection();private void button1_Click(object sender, EventArgs e){if (textBox1.Text.Trim().ToString() != String.Empty && comboBox1.Text.Trim().ToString() != String.Empty && textBox3.Text.Trim().ToString() != String.Empty){try{room r = new room();{r.房间号码 = textBox1.Text.Trim().ToString();r.房间种类 = comboBox1.Text.Trim().ToString();r.房间单价 = double.Parse( textBox3.Text.Trim().ToString());r.房间是否正在使用 = "否";}c.linq.room.InsertOnSubmit(r);c.linq.SubmitChanges();MessageBox.Show(textBox1.Text.Trim().ToString()+" 号房间添加成功");this.textBox1.Text = null;this.textBox3.Text = null;boBox1.Text = null;this.textBox1.Focus();}catch{MessageBox.Show("房间号已存在!");}}else{MessageBox.Show("不能为空!");}}private void addroom_FormClosed(object sender, FormClosedEventArgs e){this.Owner.Show();}private void button2_Click(object sender, EventArgs e) {this.Close();}}}4、查看所有房间信息设计:namespace宾馆管理信息系统{public partial class allroom : Form{private connection c=new connection ();public allroom(Form f){InitializeComponent();this.Owner = f;this.listView1.Clear();this.listView1.View = rgeIcon;rgeImageList = this.imageList1;Random rd = new Random();this.listView1.BeginUpdate();var result = from info in c.linq.roomselect new{房间号 = info.房间号码,房间类型 = info.房间种类,房间单价 = info.房间单价,房间是否使用 = info.房间是否正在使用, };foreach (var item in result){ListViewItem lvi = new ListViewItem();if(item.房间是否使用.Trim()=="否"){lvi.ImageIndex =0;}else if (item.房间是否使用.Trim() == "是"){lvi.ImageIndex = 1;}lvi.Text = item.房间号.Trim().ToString();this.listView1.Items.Add(lvi);}this.listView1.EndUpdate();}private void listView1_ItemActivate(object sender, EventArgs e){var result = from info in c.linq.roomwhere info.房间号码 == listView1.FocusedItem.Text.Trim().ToString()select new{房间号 = info.房间号码,房间类型 = info.房间种类,房间单价 = info.房间单价,房间是否使用 = info.房间是否正在使用,};foreach (var item in result){DialogResult dr = MessageBox.Show("房间号:" + listView1.FocusedItem.Text.ToString() + "\r\n房间类型:" + item.房间类型 + "\r\n房间单价:" + item.房间单价);}}private void allroom_FormClosed(object sender, FormClosedEventArgs e){this.Owner.Show();}}}5、预订房间设计:namespace宾馆管理信息系统{public partial class bookroom : Form{private connection c = new connection();public bookroom(Form f){InitializeComponent();this.Owner = f;this.listView1.Clear();this.listView1.View = rgeIcon;rgeImageList = this.imageList1;Random rd = new Random();this.listView1.BeginUpdate();var result = from info in c.linq.roomwhere info.房间是否正在使用=="否"select new{房间号 = info.房间号码,房间类型 = info.房间种类,房间单价 = info.房间单价,房间是否使用 = info.房间是否正在使用,};foreach (var item in result){ListViewItem lvi = new ListViewItem();lvi.ImageIndex =0;lvi.Text = item.房间号.Trim().ToString();this.listView1.Items.Add(lvi);}this.listView1.EndUpdate();private void bookroom_FormClosed(object sender, FormClosedEventArgs e){this.Owner.Show();}private void listView1_ItemActivate(object sender, EventArgs e){var result = from info in c.linq.roomwhere info.房间号码 == listView1.FocusedItem.Text.Trim().ToString()select new{房间号 = info.房间号码,房间类型 = info.房间种类,房间单价 = info.房间单价,房间是否使用 = info.房间是否正在使用,};foreach (var item in result){DialogResult dr = MessageBox.Show("房间号:" + listView1.FocusedItem.Text.ToString() + "\r\n房间类型:"+item.房间类型+"\r\n房间单价:"+item.房间单价+"\r\n确认使用么?", "提示", MessageBoxButtons.OKCancel);if (dr == DialogResult.OK){//用户选择确认的操作addpeople a = new addpeople(this, listView1.FocusedItem.Text.Trim().ToString());this.Hide();a.Show();}}}}}6、查看所有用户设计:namespace宾馆管理信息系统{public partial class chakanyonghu : Form{private connection c = new connection();public chakanyonghu(Form f){this.Owner = f;InitializeComponent();var result = from info in c.linq.loginselect new{用户名 = info.id,用户类型 = info.grade,};dataGridView1.DataSource = result;}}}7、修改房间的信息设计:namespace宾馆管理信息系统{public partial class changeroom : Form{private connection c = new connection();public changeroom(Form f){InitializeComponent();this.Owner = f;var result = from info in c.linq.roomselect new{房间号 = info.房间号码,房间类型 = info.房间种类,房间单价 = info.房间单价,房间是否使用 = info.房间是否正在使用,};dataGridView1.DataSource = result;}private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e){string s = Convert.ToString(dataGridView1[0, e.RowIndex].Value).Trim();changeroom2 d = new changeroom2(this, s);d.Show();this.Hide();}private void button1_Click(object sender, EventArgs e){var result = from info in c.linq.roomselect new{房间号 = info.房间号码,房间类型 = info.房间种类,房间单价 = info.房间单价,房间是否使用 = info.房间是否正在使用,};dataGridView1.DataSource = result;}}}namespace宾馆管理信息系统{public partial class changeroom2 : Form{private connection c = new connection();private string s = null;public changeroom2(Form f,string s){InitializeComponent();comboBox1.DropDownStyle = boBoxStyle.DropDownList; comboBox2.DropDownStyle = boBoxStyle.DropDownList;this.Owner = f;this.s = s;var result = from info in c.linq.roomwhere info.房间号码==sselect new{房间号 = info.房间号码,房间类型 = info.房间种类,房间单价 = info.房间单价,房间是否使用 = info.房间是否正在使用,};foreach (var item in result){this.textBox2.Text = item.房间号;this.textBox1.Text = item.房间单价.ToString();boBox1.Text = item.房间类型;boBox2.Text = item.房间是否使用;}}private void button1_Click(object sender, EventArgs e){if(textBox1.Text.Trim().ToString() != String.Empty && textBox2.Text.Trim().ToString() != String.Empty && comboBox1.Text.Trim().ToString() != String.Empty && comboBox2.Text.Trim().ToString() != String.Empty){var edit = c.linq.room.SingleOrDefault<room>(s1=>s1.房间号码==s);if (edit == null){return;}//修改student的属性edit.房间单价= double .Parse( textBox1.Text.Trim().ToString());edit.房间种类 = comboBox1.Text.Trim().ToString();edit.房间是否正在使用 = comboBox2.Text.Trim().ToString();//执行更新操作c.linq.SubmitChanges();MessageBox.Show("房间信息修改成功");this.Close();}}}}8、删除用户信息设计:namespace宾馆管理信息系统{public partial class delete : Form{private string s;private connection c = new connection();public delete(Form f){InitializeComponent();this.Owner = f;var result = from info in c.linq.loginwhere info.grade=="普通用户"select new用户名 = info.id,用户类型 = info.grade,};dataGridView1.DataSource = result;}private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) {s = Convert.ToString(dataGridView1[0, e.RowIndex].Value).Trim();delete2 d = new delete2(s,this );d.Show();this.Hide();}private void button2_Click(object sender, EventArgs e){var result = from info in c.linq.loginwhere info.grade == "普通用户"select new{用户名 = info.id,用户类型 = info.grade,};dataGridView1.DataSource = result;}}}namespace宾馆管理信息系统{public partial class delete2 : Form{private string h;private connection c = new connection();public delete2(string s,Form f){InitializeComponent();h = s;this.Owner = f;var result = from info in c.linq.loginwhere info.id == sselect new{用户名 = info.id,用户类型 = info.grade,dataGridView1.DataSource = result;}private void button1_Click(object sender, EventArgs e) {var result = from m in c.linq.loginwhere m.id == hselect m;c.linq.login.DeleteAllOnSubmit(result);c.linq.SubmitChanges();MessageBox.Show("删除成功");this.Close();}}}9、删除房间信息设计:namespace宾馆管理信息系统{public partial class deleteroom : Form{private connection c = new connection();public deleteroom(Form f){InitializeComponent();this.Owner = f;var result = from info in c.linq.roomselect new{房间号 = info.房间号码,房间类型 = info.房间种类,房间单价=info.房间单价,房间是否使用=info.房间是否正在使用,};dataGridView1.DataSource = result;}private void button2_Click(object sender, EventArgs e) {var result = from info in c.linq.roomselect new{房间号 = info.房间号码,房间类型 = info.房间种类,房间单价 = info.房间单价,房间是否使用 = info.房间是否正在使用,};dataGridView1.DataSource = result;}private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) {string s = Convert.ToString(dataGridView1[0, e.RowIndex].Value).Trim();deleteroom2 d = new deleteroom2(this,s);d.Show();this.Hide();}}}namespace宾馆管理信息系统{public partial class deleteroom2 : Form{private connection c = new connection();private string h;public deleteroom2(Form f,string h){InitializeComponent();this.Owner = f;this.h = h;var result = from info in c.linq.roomwhere info.房间号码 == hselect new{房间号 = info.房间号码,房间类型 = info.房间种类,房间单价 = info.房间单价,房间是否使用 = info.房间是否正在使用,};dataGridView1.DataSource = result;}private void button1_Click(object sender, EventArgs e){var result = from m in c.linq.roomwhere m.房间号码 == hselect m;foreach (var item in result){if (item.房间是否正在使用.Trim().ToString() == "否"){c.linq.room.DeleteAllOnSubmit(result);c.linq.SubmitChanges();MessageBox.Show("删除成功");this.Close();}else{MessageBox.Show("该房间正在使用,请先退房!");}}}}}10、查看住户信息:namespace宾馆管理信息系统{public partial class guestmessage : Form{private connection c = new connection();public guestmessage(Form f){this.Owner = f;InitializeComponent();comboBox1.DropDownStyle = boBoxStyle.DropDownList;}private void button1_Click(object sender, EventArgs e){if (comboBox1.Text.Trim().ToString() != string.Empty && textBox1.Text.Trim().ToString() !=string.Empty){switch (comboBox1.Text.Trim().ToString()){case"房间号":var edit = c.linq.guest.SingleOrDefault<guest>(s1 => s1.房间号码.Trim() ==textBox1.Text.Trim().ToString());if (edit != null){MessageBox.Show("房间号:" + edit.房间号码 + "\t\n" + "人数:" + edit.人数 + "\t\n" + "入住天数:" + edit.入住天数 + "\t\n" + "押金:" + edit.所交押金 + "\t\n" + "姓名:" + edit.姓名 + "\t\n" + "身份证号码:" + edit.住店人身份证号码);}else{MessageBox.Show("房间为空!");}break;case"用户姓名":var edit1 = c.linq.guest.SingleOrDefault<guest>(s1 => s1.姓名.Trim() ==textBox1.Text.Trim().ToString());if (edit1 != null){MessageBox.Show("房间号:"+ edit1.房间号码 + "\t\n"+ "人数:" + edit1.人数 + "\t\n" + "入住天数:" + edit1.入住天数 + "\t\n" + "押金:" + edit1.所交押金 + "\t\n" + "姓名:" + edit1.姓名 + "\t\n" + "身份证号码:" + edit1.住店人身份证号码);}else{MessageBox.Show(textBox1.Text.Trim().ToString() + "不存在");}break;case"身份证号":var edit2 = c.linq.guest.SingleOrDefault<guest>(s1 => s1.住店人身份证号码.Trim() == textBox1.Text.Trim().ToString());if (edit2 != null){MessageBox.Show("房间号:"+ edit2.房间号码 + "\t\n"+ "人数:" + edit2.人数 + "\t\n" + "入住天数:" + edit2.入住天数 + "\t\n" + "押金:" + edit2.所交押金 + "\t\n" + "姓名:" + edit2.姓名 + "\t\n" + "身份证号码:" + edit2.住店人身份证号码);}else{MessageBox.Show(textBox1.Text.Trim().ToString() + "不存在");}break;}}else{MessageBox.Show("不能为空!");}}}}11、新用户注册namespace宾馆管理信息系统{public partial class login2 : Form{private connection c = new connection();public login2(){InitializeComponent();comboBox1.DropDownStyle = boBoxStyle.DropDownList;}public login2(Form f){InitializeComponent();this.Owner = f;comboBox1.DropDownStyle = boBoxStyle.DropDownList;}private void button1_Click(object sender, EventArgs e){if(textBox1.Text.Trim().ToString() != String.Empty && textBox2.Text.Trim().ToString() != String.Empty && textBox3.Text.Trim().ToString() != String.Empty && comboBox1.Text.Trim().ToString() != String.Empty){if (comboBox1.Text.Trim().ToString() == "管理员" || comboBox1.Text.Trim().ToString() == "普通用户"){if (this.textBox2.Text.Trim().ToString() == textBox3.Text.Trim().ToString()){try{login l = new login();{l.id = textBox1.Text.Trim().ToString();l.password = textBox2.Text.Trim().ToString();l.grade = comboBox1.Text.Trim().ToString();}c.linq.login.InsertOnSubmit(l);c.linq.SubmitChanges();MessageBox.Show("注册成功");}catch{MessageBox.Show("用户名已存在!");}}else{MessageBox.Show("请再次输入确定密码!");}}else{MessageBox.Show("请选择正确的用户类型!");boBox1.Focus();}}else{MessageBox.Show("不能为空!");}}}}12、主界面设计:namespace宾馆管理信息系统{public partial class manger : Form{private string i,j;//public manger(){InitializeComponent();}public manger(string i,string j){InitializeComponent();this.i = i;this.j = j;}private void button1_Click(object sender, EventArgs e) {this.Hide();login2 l = new login2(this);l.Show();}private void manger_Load(object sender, EventArgs e) {if (i.Trim().Equals("管理员")){this.panel1.Visible = true;this.panel2.Visible = true ;}else if (i.Trim().Equals("普通用户")){this.panel2.Visible = true;this.panel1.Visible = false;}}private void button3_Click(object sender, EventArgs e){this.Hide();delete l = new delete(this);l.Show();}private void manger_FormClosed(object sender, FormClosedEventArgs e) {System.Environment.Exit(0);}private void button4_Click(object sender, EventArgs e){this.Hide();chakanyonghu l = new chakanyonghu(this);l.Show();}private void button5_Click(object sender, EventArgs e){this.Hide();xiugaimima l = new xiugaimima(this, j);l.Show();}private void button6_Click(object sender, EventArgs e){this.Hide();addroom l = new addroom(this);l.Show();}private void button7_Click(object sender, EventArgs e){this.Hide();deleteroom l = new deleteroom(this);l.Show();}private void button8_Click(object sender, EventArgs e){this.Hide();changeroom l = new changeroom(this);l.Show();}private void button2_Click(object sender, EventArgs e){this.Hide();bookroom l = new bookroom(this);l.Show();}private void button9_Click(object sender, EventArgs e){this.Hide();unsubscribe l = new unsubscribe(this);l.Show();}private void button10_Click(object sender, EventArgs e){this.Hide();allroom l = new allroom(this);l.Show();}private connection c = new connection();private ArrayList arl = new ArrayList();private void button11_Click(object sender, EventArgs e){var result = from m in c.linq.guestselect m;foreach (var item in result){if (item.入住时间.Trim() != System.DateTime.Now.Day.ToString()){var edit = c.linq.room.SingleOrDefault<room>(s => s.房间号码 == item.房间号码);if (item.所交押金 >= (item.入住天数 + 1) * edit.房间单价){item.入住天数++;item.入住时间 = System.DateTime.Now.Day.ToString();c.linq.SubmitChanges();}else{try{exitroom r = new exitroom();{r.押金不足的房间号 = item.房间号码;}c.linq.exitroom.InsertOnSubmit(r);c.linq.SubmitChanges();}catch{}MessageBox.Show("请提醒"+item.房间号码+"号房的"+item.姓名+"退房或者续交房费"); }}}var result1 = from m in c.linq.exitroomselect m;dataGridView1.DataSource = result1;}private void button12_Click(object sender, EventArgs e){var result1 = from m in c.linq.exitroomselect m;dataGridView1.DataSource = result1;}private void button13_Click(object sender, EventArgs e){rejiaofei r = new rejiaofei(this);this.Hide();r.Show();}private void button14_Click(object sender, EventArgs e){guestmessage m = new guestmessage(this);this.Hide();m.Show();}private void button15_Click(object sender, EventArgs e){this.Close();}private void button16_Click(object sender, EventArgs e){this.Hide();login1 l = new login1();l.Show();}}}13、用户再次缴费:namespace宾馆管理信息系统{public partial class rejiaofei : Form{private connection c = new connection();public rejiaofei(Form f){InitializeComponent();this.Owner = f;}private void button1_Click(object sender, EventArgs e){try{var edit = c.linq.guest.SingleOrDefault<guest>(s1 => s1.房间号码.Trim() == this.textBox1.Text.Trim().ToString());edit.所交押金 = edit.所交押金 + int.Parse(textBox2.Text.Trim().ToString()); edit.入住天数++;edit.入住时间 = System.DateTime.Now.Day.ToString();var result3 = from m in c.linq.exitroomwhere m.押金不足的房间号 == textBox1.Text.Trim().ToString()select m;c.linq.exitroom.DeleteAllOnSubmit(result3);c.linq.SubmitChanges();MessageBox.Show("缴纳成功!");}catch{MessageBox.Show("缴纳失败,请核对房间号!");}}private void rejiaofei_FormClosed(object sender, FormClosedEventArgs e){this.Owner.Show();}}}15、退房设计:namespace宾馆管理信息系统{public partial class unsubscribe : Form{private connection c = new connection();public unsubscribe(Form f){this.Owner = f;InitializeComponent();}private void button1_Click(object sender, EventArgs e){if (textBox1.Text.Trim().ToString() != string.Empty){var result = from info in c.linq.roomwhere info.房间号码==textBox1.Text.Trim().ToString()select new{房间号 = info.房间号码,房间类型 = info.房间种类,房间单价 = info.房间单价,房间是否使用 = info.房间是否正在使用,};if (result.Count() == 0){MessageBox.Show("请输入正确的房间号!");this.textBox1.Focus();}else if (result.Count() == 1){foreach (var item in result){if (item.房间是否使用.Trim() == "是"){DialogResult dr = MessageBox.Show("房间号:" + textBox1.Text.ToString() + "\r\n确认退房么?", "提示", MessageBoxButtons.OKCancel);if (dr == DialogResult.OK){var result1 = from info in c.linq.guestwhere info.房间号码 == textBox1.Text.Trim().ToString()select new{房间号 = info.房间号码,入住天数 = info.入住天数,所交押金 = info.所交押金,姓名 = info.姓名,};foreach (var item1 in result1){double i = item1.入住天数 * item.房间单价;double j = item1.所交押金 - i;MessageBox.Show("入住天数:" + item1.入住天数 + "\t\n总押金:" + item1.所交押金 + "\t\n消费金额:" + i + "应找回:" + j);var edit = c.linq.room.SingleOrDefault<room>(s1 => s1.房间号码 ==textBox1.Text.Trim().ToString());if (edit == null){return;}edit.房间是否正在使用 = "否";//执行更新操作var result2 = from m in c.linq.guestwhere m.房间号码 == textBox1.Text.Trim().ToString()select m;var result3 = from m in c.linq.exitroomwhere m.押金不足的房间号 == textBox1.Text.Trim().ToString()select m;c.linq.exitroom.DeleteAllOnSubmit(result3);c.linq.guest.DeleteAllOnSubmit(result2);c.linq.SubmitChanges();MessageBox.Show("房号为"+item1.房间号+"的"+item1 .姓名+"退房成功!");this.Close();}}}else{MessageBox.Show("该房间并未订购!无法退订!");}}}}else{MessageBox.Show("请输入房间号!");this.textBox1.Focus();}}}}16、修改用户密码:namespace宾馆管理信息系统{public partial class xiugaimima : Form{private connection c=new connection ();private string i;public xiugaimima(Form f,string i){this.Owner = f;this.i = i;InitializeComponent();}private void button1_Click(object sender, EventArgs e){if(textBox1.Text.Trim().ToString() != String.Empty && textBox2.Text.Trim().ToString() != String.Empty && textBox3.Text.Trim().ToString() != String.Empty){string id = null, pw = null, gd = null;var result = from info in c.linq.loginwhere info.id == this.iselect new{ID = info.id,pw = info.password,gd = info.grade,};foreach (var p in result){id = p.ID;pw = p.pw;gd = p.gd;}if (pw.Trim() == textBox1.Text.ToString().Trim()){if (textBox2.Text.Trim().ToString().Equals(textBox3.Text.Trim().ToString())){var edit = c.linq.login.SingleOrDefault<login>(s=>s.id==i);if (edit == null){return;}edit.password = textBox3.Text.Trim().ToString();//执行更新操作c.linq.SubmitChanges();MessageBox.Show("密码修改成功");this.Dispose();login1 l = new login1();l.Show();}}else{MessageBox.Show("密码错误!");}}else{MessageBox.Show("不能为空!");}}}}三、测试方案设计:1、测试数据房间信息:账户信息:住户信息:2、测试结果:测试次数结果登录响应时间(秒)1 登录成功0.52 登录成功0.43 登录成功0.6平均时间:0.5修改密码通过密保找回成功0.5重设密码验证密保并成功设置0.5平均时间:0.5四、测试结果分析:经过测试,数据在储存和使用过程中不会丢失,但是数据的安全性不是很高。

软件工程酒店管理系统

软件工程酒店管理系统

7-8 对一个包含10000条机器指令的程序进行一个月集成测试后,总共改正了15个错误,此时MTTF=10h;经过两个月测试后,总共改正了25个错误(第二个月改正10个错误),MTTF=15h。

要求:(1) 根据上述数据确定MTTF与测试时间之间的函数关系,画MTTF与测试时间τ的关系曲线。

在画这条曲线时做了什么假设?(2)为做到MTTF=100h,必须进行多长时间的集成测试?当集成测试结束时总共改正了多少个错误,还有多少个错误潜伏在程序中?答:所做假设:1)单位长度里的错误数近似为常数;2)失效率正比于软件中剩余的错误数,而平均无故障时间与剩余的错误数成反比. 3)发现的每一个错误都立即正确地改正了.(2)由Shooman公式:MTTF=IT/(K*(ET—EC(T)))IT=104,MTTF1=10,n1=15,MTTF2=15,n2=25.得:MTTF1=IT/(K*(ET—EC(T1))) 10=10000/(K*(ET-15)) MTTF2=IT/(K*(ET—EC (T2)))15=10000/(K*(ET—25)) 解得程序中固有的错误总数ET=45,此外K=100/3。

(2)设MTTF=100,有100=10000/((100/3)*(45-x))解得x=42.所以,当集成测试结束时,改正了42个错误,还剩3个错误。

7-9 如对一个长度为100000条指令的程序进行集成测试期间记录下下面的数据:(a) 7月1日:集成测试开始,没有发现错误。

(b) 8月2日:总共改正100个错误,此时MTTF=0。

4h(c) 9月1日:总共改正300个错误,此时,MTTF=2h根据上列数据完成下列各题:(1) 估计程序中的错误总数;(2)为使MTTF达到10h,必须测试和调试这个程序多长时间?(3)画出MTTF和测试时间τ之间的函数关系线。

答:MTTF=IT/(K*(ET—EC(T)))IT=105,MTTF1=0。

酒店管理系统软件工程课程设计模板

酒店管理系统软件工程课程设计模板

酒店管理系统软件工程课程设计酒店客房管理系统第七组组长: 刘静祝组员: 何琴、袁顺王广川、周怀相、冯平计算机科学与技术11级目录一、摘要: (5)二、可行性分析 (6)1.编写目的: (6)2.项目背景: (6)2.1项目总述: (6)2.2相关定义: (6)3可行性研究的前提 (6)3.1欲开发软件的基本要求: (6)3.2目标: (7)3.3条件、假定和限制: (7)3.4进行可行性研究的方法: (8)4对现有系统的分析: (8)5对所建议系统的分析: (8)6社会因素方面的可行性 (8)6.1法律方面的可行性: (8)6.2使用方面的可行性: (8)7结论: (8)三、需求分析 (9)1................................................................................................. 引言:91.1 编写目的: (9)1.2 背景: (9)1.3 运行环境: (9)1.4 定义: (9)2. 项目概述: (10)2.1 项目目标: (10)2.2 用户的特点: (10)3. 总体需求调查: (10)3.1 系统目标: (10)3.2 业务处理总体流程调查: (11)4. 系统功能调查: (13)4.1 订房及入住管理功能: (13)4.2 退房管理功能: (14)4.3 客户信息管理功能: (16)4.4 客房信息管理功能: (18)4.5 系统设置功能: (19)5. 系统主要功能的数据流图表: (20)6. 数据字典: (21)6.1 主要数据流描述: (21)6.2 主要数据项条目: (22)6.3 数据存储条目: (23)6.4 E-R图设计: (24)7. 安全性要求调查: (26)8. 性能要求调查: (26)8.1 数据精确度: (26)8.2 时间特性: (26)8.3 适应性: (26)四、总体设计 (27)1. 引言: (27)1.1 编写目的: (27)1.2 范围: (27)1.3 定义: (27)1.4 参考资料: (27)2. 总体设计: (27)2.1 需求规定: (27)2.2 运行环境 (27)2.3 结构: (28)2.4 基本设计概念和处理流程: (29)2.5 各个功能需求与其相关主要程序的关系: (37)2.6 人工处理过程: (42)3. 数据库设计: (42)4. 用户界面设计: (45)五、详细设计 (46)1. 引言: (46)1.1 编写目的: (46)1.2 背景说明: (46)1.3 参考资料: (46)1.4 部分内容定义: (46)2. 程序系统的结构: (46)3. 程序设计说明: (48)3.1 程序 ONLOADSYS 设计说明: (48)3.2 程序 ONBOOK 设计说明: (49)3.3 程序ONORDER 设计说明: (50)3.4 程序 ONCHECKIN 设计说明: (51)3.5 程序 ONCHECKOUT 设计说明: (52)3.6 程序 ONMROOM 设计说明: (53)3.7 程序 ONMCLIENT 设计说明: (54)3.8 程序 ONSYSSET 设计说明: (55)六、测试分析及维护 (56)1. 引言: (56)1.1 编写目的: (56)1.2 背景说明: (56)1.3 参考资料: (56)。

【说明书】软件工程课程设计说明书酒店点菜系统

【关键字】说明书目录一概述 (1)二详细设计说明书 (2)2.1 引言 (2)2.2总体设计 (3)软件总体结构 (3)软件数据结构 (4)2.3程序描述 (6)高层控制流程图 (6)登录模块 (7)退出模块 (7)菜单修改模块 (8)菜单分类模块 (21)菜单打印模块(用于厨房) (22)厨房库存管理模块 (27)结账模块 (29)2.4运行环境 (31)三实验体会 (32)四参考文献 (33)一概述概括地说,软件工程是指导计算机软件开发和维护的一门工程学科。

根据软件工程的原理:(1)用分阶段的生存周期计划进行严格的管理;(2)坚持进行阶段评审;(3)实行严格的产品控制;(4)采用现代程序设计技术;(5)软件工程结果应能清楚地审查;(6)开发小组的人员应该少而精;(7)承认不断改进软件工程实践的必要性;对软件进行开发,在开发完之后还要根据相关的维护原则对软件进行定期维护,这样才能提高软件使用周期,才算好软件。

实验目的是为了加深和巩固对软件工程理论的认识和理解,掌握使用软件工程思想开发软件设计的基本步骤、思想和方法。

熟练运用软件开发过程中的设计工具以及明确他们的应用范围和方法,提高软件开发的效率、可用性等。

锻炼、提高应用软件工程思想及基本理论解决实际问题的能力和实际动手操作能力、创新能力以及查阅技术文献以及编写文档的能力,更加锻炼了团队协作能力。

本系统的设计模拟的是餐饮企业中顾客点菜及菜单、库存管理的内容:1、服务员信息的管理:查询、增、删、改2、菜谱信息的管理:查询、增、删、改3、厨师信息的管理:查询、增、删、改4、菜单信息管理(1)、餐桌点菜:服务员按照用户需求为其点菜并提交菜单给厨房(2)、点菜信息分类。

(3)、做菜管理:可以获得自己的待做菜单,并对已做的菜进行标记(4)、上菜管理:对已上菜和待上菜进行管理(5)、修改菜单管理:退菜、加菜。

5、库存管理:(1)、查看库存清单。

(2)、修改库存清单。

酒店管理系统设计


关键词 酒店管理 管理 信息 系统 中图分类号 C9 16 3 .
A cs ep i ces lh D 文献标识码 A
文章t l n g me tS se sg n t e Ho e Ma a e n y t m
a ay i a d d sg ,t e s s m s d v d d i t wo ma n f n t n d ls r n e k ma a e n ,a d s se n lss n e in h y t e i ii e n o t i u ci a mo u e :F o t d s n g me t n y tms ol
ma a e n . tl n g me t y t m l me t t er o e p c a g s c so r n o ma in a d mo i c t n n g me t Ho e ma a e n se i e n s h o mst s t h n e , u t me f r t , n df ai s mp o u i o i o
i r v n u i fs r iet o s s e e yp st er l . mp o i gt q a t o ev c obep se s dav r o ii oe he l y v I c o d n e wi hemeh d fs fwa e e gn e i g t o e na e n y tm a re u h e u r me t n a c r a c t t t o so ot r n ie rn , heh tlma g me ts se c riso tt e r q ie n s h
酒店 管理 系统 设计
王 菁
( 安徽工业 大学 马鞍 山 23 0 ) 40 0

软件工程大作业模板—酒店管理信息系统分析与设计

大连理工大学城市学院《软件工程导论》大作业酒店管理系统分析与设计任课教师:张应博班级:软件120*班学号:姓名:成绩:完成日期:2013年6月26日摘要酒店管理是酒店日常运作的一个重要环节,学习制作酒店管理系统是很有必要的,同时,酒店管理系统也是服务行业管理软件的一个综合性代表,很具有实践的意义。

本酒店管理系统是用PowerBuilder和Microsoft access制作而成,主要包括客户信息登记、分配房间、消费管理、结账和统计以及员工信息管理等主要功能。

根据客户需求给其分配房间,并且对客户在酒店的消费情况进行统计以及客户结账,系统也对员工信息进行统计,管理员可以给予员工登录系统的权限。

根据需要,系统建立了6个表,分别用来记录客户信息、员工信息、消费分类、客户消费档案、房间信息和客户住房信息。

房间有三种状态,即“已分配”、“已预订”、“未分配”,员工有三种权限即:“T”、“U”、“F”分别代表管理员权限和一般用户权限,“F”权限不能登录系统,而管理员是由系统默认。

这些状态分别可以对房间和员工进行管理。

结论主要介绍了酒店管理在酒店日常运作中的作用,以及酒店管理系统的必要性。

整个系统的开发过程包括:可行性分析、需求分析、总体设计、详细设计、系统实现以及测试计划。

其中关键的技术包括数据库的建立,数据库的连接,数据的添加、删除和更新。

为了系统的顺利完成。

开发人员将要密切合作和详细的分工。

关键词:酒店管理系统;PowerBuilder;Microsoft access;数据库目录第一章前言 (1)1.1背景 (1)1.2编写目的 (1)1.3定义 (1)第二章可行性分析 (2)2.1技术的可行性 (2)2.2经济的可行性 (2)2.3管理上的可行性 (2)2.4结论 (2)第三章需求分析 (4)3.1具体需求 (4)3.1.1功能需求 (4)3.2数据流图 (4)3.3数据字典 (6)3.4实体关系模型图 (7)3.4.1实体图 (7)3.4.2总体E-R图 (8)3.5性能需求 (8)3.6数据管理能力需求 (8)3.7故障处理需求 (9)3.8其他需求 (9)3.9运行环境需求 (9)第四章总体设计 (10)4.1系统分析 (10)4.2系统设计 (10)4.2.1软件组织结构 (10)4.3功能说明 (11)4.4重要数据的数据结构设计 (11)4.4.1变量设计 (11)4.5函数设计 (11)第五章详细设计 (12)5.1数据库的详细设计 (12)5.2数据库的实现 (12)5.3界面设计 (13)5.3.1系统登录界面 (14)5.3.2系统主界面 (14)5.4系统功能详细说明 (14)5.4.1客户信息管理模块 (14)5.4.2房间管理模块 (15)5.4.3客户消费管理模块 (15)5.4.4结账管理模块 (15)5.4.5员工管理模块 (15)第六章系统实现 (17)6.1系统登录模块 (17)6.2客户信息登记模块 (17)6.3客户房间分配模块 (18)6.4空余房间管理窗体 (19)6.5餐饮管理窗体 (19)6.6娱乐消费管理窗体 (20)6.7酒店统计管理窗体 (20)6.8结账退房窗体 (21)6.9员工信息管理 (21)第七章系统测试 (22)7.1登录测试 (22)7.2系统功能模块测试 (22)第八章使用说明 (24)8.1运行环境 (24)8.2性能说明 (24)8.3操作说明 (24)总结与展望 (25)参考文献 (26)第一章前言1.1背景现代社会,科技飞速发展,电脑不断普及。

软件工程课程设计_完整版

项目名称:酒店宾馆住宿管理系统专业:计算机科学与技术班级: 06计本(2)班指导老师:李 * *开发组长: * *开发成员: ***、***、*****、***2009年5月前言计算机的高速发展正改变着人类的生活,它的多姿多彩正一点一滴的渗透到人们生活的每个方面,计算机的应用覆盖的广阔性是世界各地各个行业的人们利用计算机进行高效管理的重要手段。

人们并通过将各个行业软件装入计算机,使计算机更高效的工作。

本项目编程的一个主要工具是Visual C++。

因为C++是一种面向对象的程序设计方法,具有某些特有的优点:封装性,即把数据和行为隐藏,用户不需要知道内部结构;继承性,方便开发人员重用代码,提高效率;多态性等。

所以Visual C++为本项目的最佳开发工具。

本系统采用VC++面向对象编程语言编写,用SQL 2000数据库系统存放用户信息和产生的数据。

本系统采用C/S服务器结构,能基本满足客户需求。

目录1 前言....................................................................................................... 错误!未定义书签。

2 项目组成员分工 (4)3 文件的使用者 (5)4 软件生存周期与各种文件的编制 (5)5 可行性研究报告(项目开发计划) (6)6 软件需求说明书................................................................................... 错误!未定义书签。

7 概要设计说明书 (15)8详细设计说明书.................................................................................... 错误!未定义书签。

9 编码与数据库设计说明书 (44)10测试计划 (50)11心得体会 (55)2.项目组成员分工1、可行性研究与项目开发计划-------------**2、需求分析-------------***3、概要设计-----------***4、详细设计----------***5、数据库设计--------**6、编码与调试--------**7、测试计划---------盛**3 文件的使用者对于使用文件的人员而言,他们所关心的文件的种类,随他们所承担的工作而异。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
相关文档
最新文档