小型餐馆管理系统文档分析报告.docx
《小型餐馆管理系统文档分析报告.docx》由会员分享,可在线阅读,更多相关《小型餐馆管理系统文档分析报告.docx(24页珍藏版)》请在冰豆网上搜索。
小型餐馆管理系统文档分析报告
小型餐馆管理系统文档分析报告
组长:
吴平(1008060180)
组员:
潘攀(1008060253)
杨亮(1008060013)
王茜(1008060274)
年级:
2010级
指导老师:
刘峰
时间:
2012年6月14日星期四
目录
1.用例图……………………………………………………………….3
1.1.记录预约用例描述……………………………………………3
1.2取消预约用例描述……………………………………………4
1.3.修改预约用例描述……………………………………………4
1.4调换餐桌用例描述……………………………………………4
1.5预约顾客到达用例描述………………………………………4
1.6未预约顾客到达用例描述……………………………………4
2.设计类…………………………………………………………………5
3.顺序图………………………………………………………………..5
3.1记录预约用例的顺序图描述……………………………………………….6
3.2修改预约用例的顺序图描述………………………………………………..7
3.3取消预约用例的顺序图描述………………………………………………..8
3.4调换餐桌用例的顺序图描述………………………………………………………………….9
3.5预约顾客到达用例的顺序图描述……………………………………………….10
3.6未预约顾客到达用例的顺序图描述……………………………………………11
3.7显示预约用例的顺序图描述………………………………………………..12
4.餐馆界面………………………………………………………………………………..13
5.餐馆管理系统代码………………………………………………………….14
6.小组分工情况…………………………………………………………22
一:
用例图
1.记录预约
接待员输入要预约的日期;系统显示该日的预约;接待员输入顾客的姓名和电话,预约的时间,用餐人数和餐桌号;如果输入的预约用餐人数多于餐桌能容纳的人类,于是系统发出一个警告信息询问用户是否想要继续预约;如果用户回答‘是’,用例将不进行预约而终止;如果用户回答‘否’,预约将被输入,并附有一个警告标志。
2.取消预约
接待员选择要求的预约;接待员取消该预约;系统询问接待员确认取消预约;接待员如果回答‘是’,系统记录取消并更新显示。
接待员如果回答‘否’,系统则不进行任何操作。
3.修改预约
接待员执行‘修改预约’;接待员重新输入顾客姓名和电话号码、预定的时间、用餐人数以及预留的餐桌;系统询问接待员是否要更改预约;接待员如果回答‘是’,系统则记录修改并更新预约,接待员如果回答‘否’,系统则不进行任何操作。
4、调换餐桌
侍者领班选择需要的预约;侍者领班改变该预约的餐桌分配;系统询问侍者领班确认调换;侍者领班如果回答‘是’;系统则记录改变并更新显示,侍者领班如果回答‘否’,系统则不进行任何操作。
5、预约顾客到达
侍者领班执行‘显示预约’,侍者领班输入时间、用餐人数和分配给顾客的餐桌;系统显示出来相关的预约信息。
6、未预约顾客到达
侍者领班执行‘显示预约’,侍者领班输入时间、用餐人数和分配给顾客的餐桌;系统显示‘没有相关预约’,系统接着发出一个信息询问用户是否想要进行预约;如果用户回答‘是’,则系统记录预约并更新显示;如果用户回答‘否’,则系统不进行任何操作。
二.设计类:
1.Cutomer类(顾客):
进行预定的人。
属性
类型
意义
name
CHAR
名字
phoneNuber
CHAR
电话号码
2.Reservation类(预订):
提前预约一个特定时间的晚餐。
属性
类型
意义
Reservation
CHAR
预订
covers
CHAR
预订将来用餐的人数
date
CHAR
用餐日期
time
CHAR
用餐时间
3.Table类(餐桌):
预订餐桌号
属性
类型
意义
places
CHAR
餐桌号
4.WalkIn(未预约):
没有提前进行的预
三:
顺序图
1.记录预约用例的顺序图描述:
2.修改预约用例的顺序图描述:
3.取消预约用例的顺序图描述:
4.调换餐桌用例的顺序图描述:
5.预约顾客到达用例的顺序图描述:
6.未预约顾客到达用例的顺序图描述:
7.显示预约用例的顺序图描述:
四:
餐馆界面:
主界面:
二级界面:
五:
餐馆管理系统代码:
1usingSystem;
2usingSystem.Collections.Generic;
3usingSystem.ComponentModel;
4usingSystem.Data;
5usingSystem.Drawing;
6usingSystem.Text;
7usingSystem.Windows.Forms;
8usingSystem.Collections;
9namespace餐饮管理系统
10...{
11publicpartialclassfrmManagement:
Form
12...{
13ArrayListRoomStatus=newArrayList();
14ArrayListVipClass=newArrayList();
15publicfrmManagement()
16...{
17InitializeComponent();
18}
19
20privatevoid餐桌类型BindingNavigatorSaveItem_Click(objectsender,EventArgse)
21...{
22this.Validate();
23this.餐桌类型BindingSource.EndEdit();
24this.餐桌类型TableAdapter.Update(this.dieteticManagementDataSet餐桌类型);
25}
26
27privatevoidfrmManagement_Load(objectsender,EventArgse)
28...{
29//TODO:
这行代码将数据加载到表“dieteticManagementDataSet.管理员”中。
您可以根据需要移动或移除它。
30this.管理员TableAdapter.Fill(this.dieteticManagementDataSet.管理员);
31//TODO:
这行代码将数据加载到表“dieteticManagementDataSet.Vip”中。
您可以根据需要移动或移除它。
32this.vipTableAdapter.Fill(this.dieteticManagementDataSet.Vip);
33
34//TODO:
这行代码将数据加载到表“dieteticManagementDataSet.餐桌编号”中。
您可以根据需要移动或移除它。
35this.餐桌编号TableAdapter.Fill(this.dieteticManagementDataSet.餐桌编号);
36//TODO:
这行代码将数据加载到表“dieteticManagementDataSet.食品类别”中。
您可以根据需要移动或移除它。
37this.食品类别TableAdapter.Fill(this.dieteticManagementDataSet.食品类别);
38//TODO:
这行代码将数据加载到表“dieteticManagementDataSet.商品”中。
您可以根据需要移动或移除它。
39
40//TODO:
这行代码将数据加载到表“dieteticManagementDataSet.餐桌”中。
您可以根据需要移动或移除它。
41this.餐桌TableAdapter.Fill(this.dieteticManagementDataSet.餐桌);
42//TODO:
这行代码将数据加载到表“dieteticManagementDataSet.餐桌类型”中。
您可以根据需要移动或移除它。
43this.餐桌类型TableAdapter.Fill(this.dieteticManagementDataSet.餐桌类型);
44VipClass.Add("普通会员");
45VipClass.Add("中级会员");
46VipClass.Add("高级会员");
47RoomStatus.Add("可供");
48RoomStatus.Add("预订");
49RoomStatus.Add("占用");
50RoomStatus.Add("停用");
51RoomStatus.Add("脏台");
52性别ComboBox.Items.Add("男");
53性别ComboBox.Items.Add("女");
54级别ComboBox.Items.Clear();
55foreach(stringsinVipClass)
56级别ComboBox.Items.Add(s);
57餐台状态ComboBox.Items.Clear();
58foreach(stringsinRoomStatus)
59餐台状态ComboBox.Items.Add(s);
60string[]sdata=Program.DBOpertor.GetRoomClass();
61餐桌类型ComboBox.Items.Clear();
62for(inti=0;i63餐桌类型ComboBox.Items.Add(sdata[i]);
64}
65
66privatevoid餐桌BindingNavigatorSaveItem_Click(objectsender,EventArgse)
67...{
68this.Validate();
69this.餐桌BindingSource.EndEdit();
70this.餐桌TableAdapter.Update(this.dieteticManagementDataSet.餐桌);
71}
72
73privatevoidAdd_Click(objectsender,EventArgse)
74...{
75//newfrmAddAndModification(餐桌DataGridView,this.dieteticManagementDataSet.餐桌).Show();
76
77frm餐桌f=newfrm餐桌(this.dieteticManagementDataSet.餐桌,"Add");
78foreach(stringsinRoomStatus)
79f.餐台状态ComboBox.Items.Add(s);
80string[]sdata=Program.DBOpertor.GetRoomClass();
81for(inti=0;i82f.餐桌类型ComboBox.Items.Add(sdata[i]);
83f.ShowDialog();
84//f.Dispose();
85}
86
87privatevoidDelete_Click(objectsender,EventArgse)
88...{
89if(MessageBox.Show("确定要删除吗?
","删除确定",MessageBoxButtons.YesNo)==DialogResult.Yes)
90...{
91stringno=餐桌DataGridView.CurrentRow.Cells[0].Value.ToString();
92this.dieteticManagementDataSet.餐桌.Rows.Find(no).Delete();
93}
94}
95
96privatevoidModification_Click(objectsender,EventArgse)
97...{
98stringno=餐桌DataGridView.CurrentRow.Cells[0].Value.ToString();
99using(frm餐桌f=newfrm餐桌(this.dieteticManagementDataSet.餐桌.Rows.Find(no),"Modification"))
100...{
101foreach(stringsinRoomStatus)
102f.餐台状态ComboBox.Items.Add(s);
103string[]sdata=Program.DBOpertor.GetRoomClass();
104for(inti=0;i105f.餐桌类型ComboBox.Items.Add(sdata[i]);
106f.ShowDialog();
107}
108
109}
110
111privatevoidbutton1_Click(objectsender,EventArgse)
112...{
113using(frm餐桌类型f=newfrm餐桌类型(this.dieteticManagementDataSet.餐桌类型,"Add"))
114...{
115f.ShowDialog();
116}
117}
118
119privatevoidbutton2_Click(objectsender,EventArgse)
120...{
121if(MessageBox.Show("确定要删除吗?
","删除确定",MessageBoxButtons.YesNo)==DialogResult.Yes)
122...{
123stringno=餐桌类型DataGridView.CurrentRow.Cells[0].Value.ToString();
124this.dieteticManagementDataSet.餐桌类型.Rows.Find(no).Delete();
125}
126}
127
128privatevoidbutton3_Click(objectsender,EventArgse)
129...{
130stringno=餐桌类型DataGridView.CurrentRow.Cells[0].Value.ToString();
131using(frm餐桌类型f=newfrm餐桌类型(this.dieteticManagementDataSet.餐桌类型.Rows.Find(no),"Modification"))
132...{
133f.ShowDialog();
134}
135}
136
137privatevoid商品类型添加_Click(objectsender,EventArgse)
138...{
139using(frm商品类型f=newfrm商品类型(this.dieteticManagementDataSet.食品类别,"Add"))
140...{
141f.ShowDialog();
142}
143}
144
145privatevoid商品类型删除_Click(objectsender,EventArgse)
146...{
147if(MessageBox.Show("确定要删除吗?
","删除确定",MessageBoxButtons.YesNo)==DialogResult.Yes)
148...{
149stringno=商品类型DataGridView.CurrentRow.Cells[0].Value.ToString();
150this.dieteticManagementDataSet.食品类别.Rows.Find(no).Delete();
151}
152}
153
154privatevoid商品类型修改_Click(objectsender,EventArgse)
155...{
156stringno=商品类型DataGridView.CurrentRow.Cells[0].Value.ToString();
157using(frm商品类型f=newfrm商品类型(this.dieteticManagementDataSet.食品类别.Rows.Find(no),"Modification"))
158...{
159f.ShowDialog();
160}
161}
162
163privatevoid商品类型保存_Click(objectsender,EventArgse)
164...{
165this.Validate();
166this.食品类别BindingSource.EndEdit();
167this.食品类别TableAdapter.Update(this.dieteticManagementDataSet.食品类别);
168}
169
170privatevoid餐桌编号添加_Click(objectsender,EventArgse)
171...{
172using(frm餐桌编号f=newfrm餐桌编号(this.dieteticManagementDataSet.餐桌编号,"Add"))
173...{
174DataTableBigClass=Program.DBOpertor.GetBigClass();
175stringSBigClass;
176for(inti=0;i177...{
178SBigClass=BigClass.Rows[i]["食品类别"].ToString();
179f.食品类别ComboBox.Items.Add(SBigClass);
180}
181f.ShowDialog();
182}
183}
184
185privatevoid餐桌编号删除_Click(objectsender,EventArgse)
186...{
187if(MessageBox.Show("确定要删除吗?
","删除确定",MessageBoxButtons.YesNo)==DialogResult.Yes)
188...{
189stringno=餐桌编号DataGridView.CurrentRow.Cells[0].Value.ToString();
190this.dieteticManagementDataSet.餐桌编号.Rows.Find(no).Delete();
191}
192}
193
194privatevoid餐桌编号修改_Click(objectsender,EventArgse)
195...{
196stringno=餐桌编号DataGridView.CurrentRow.Cells[0].Value.ToString();
197using(frm餐桌编号f=newfrm餐桌编号(this.dieteticManagementDataSet.餐桌编号.Rows.Find(no),"Modification"))
198...{
199f.ShowDialog();
200}
201}
202
203privatevoid餐桌编号保存_Click(objectsender,EventArgse)
204...{
205this.Validate();
206this.餐桌编号BindingSource.EndEdit();
207this.餐桌编号TableAdapter.Update(this.dieteticManagementDataSet.餐桌编号);
208}
209
210privatevoid餐桌类型保存_Click(objectsender,EventArgse)
211...{
212this.Validate();
213this.餐桌类型BindingSource.EndEdit();
214this.餐桌类型TableAdapter.Update(this.dieteticManagementDataSet.餐桌类型);
215}
216
217privatevoid餐桌保存_Click(objectsender,EventArgse)
218...{
219this.Validate();
220this.餐桌BindingSource.EndEdit();
221this.餐桌TableAdapter.Update(this.dieteticManagementDataSet.餐桌);
222}
223
224privatevoidVip添加_Click(objectsender,EventArgse)
225...{
226using(frmVipf=newfrmVip(this.dieteticManagementDataSet.Vip,"Add"))
227...{
228f.性别ComboBox.Items.Add("男");
229f.性别ComboBox.Items.Add("女");
230foreach(stringsinVipClass)
231f.级别ComboBox.Items.Add(s);
232f.ShowDialog();
233}
234}
235
236privatevoidVip修改_Click(objectsender,EventArgse)
237...{
238stringno=vipDataGridView.CurrentRow.Cells[0].Value.ToString();
239using(frmVipf=new