餐饮管理系统实训报告文档格式.doc
- 文档编号:808132
- 上传时间:2023-04-29
- 格式:DOC
- 页数:16
- 大小:610KB
餐饮管理系统实训报告文档格式.doc
《餐饮管理系统实训报告文档格式.doc》由会员分享,可在线阅读,更多相关《餐饮管理系统实训报告文档格式.doc(16页珍藏版)》请在冰点文库上搜索。
生日
Phone
电话
Gender
Int
性别
Useraddress
地址
Usertype
用户类型
0为普通用户,1为超级管理员
Pwd
用户密码
16
用户信息
W_user
桌子表
W_table表
Tid
桌子编号
Tname
餐桌名
Position
Nvarchar(100)
餐桌位置
Describe
Nvarchar(500)
描述
Status
int
1正在使用,0为空闲
桌子信息w_table
餐桌状态
开台记录(用餐记录)
W_orders表
Ordered
订单ID
_time
用餐时间或者预定用餐时间
Numbers
用餐人数
外键,来自w_table
接待人员
外键,来自W_USER
Amount
Decimal(18,2)
实收金额
开台记录W_orders
用餐时间
桌台号
客户用餐明细
W_guestfood表
Id
自增
Foodid
外键,来自w_food
Number
数量
Remark
Lineprice
行计算价
服务人员
客户用餐明细信息
W_guestfood
食物编号
系统编号
订单号
行计价
食物类型
W_foodtype表
Typeid
食物类别ID
Foodtype
食物类别名
食物类别信息表w_foodtype
类别名
食物类别
餐厅食物
W_food表
食物ID
Foodname
名称
Foodprice
价格
Unite
单位
W_food
食物类别IDI
超级用户
进入主窗体
系统登录
结束
图1业务流程图
订餐管理
用户管理
退出
桌台管理
食物管理
食物类型管理
图2餐饮管理系统功能结构图
3.2前台设计
3.2.1登陆界面:
功能:
用户可以通过此界面登陆系统
图3.1登陆界面
3.2.2main界面的实现
前台管理,实现各种界面管理,可以通过图片信息查看桌子是否已使用,也可选中图标单击右键选择相应业务
图3.2主界面
3.2.3食物类型管理
可自动添加食物类别,删除食物类别的同时也删除该类别下的食物
图3.3食物类型管理
3.2.4食物管理
可添加删除食物
图3.4食物管理
3.2.5桌台信息
可查看桌子的具体信息及使用状态(0为空闲,1为使用)
图3.5桌台管理
3.2.6开台
此界面可也选择用餐人数及服务员和用餐时间
图3.6开台界面
3.2.7点菜
单击左边菜谱,输入数量选择服务人员,注明备注单击保存即完成点菜功能
图3.7点菜界面
3.2.8结账
根据订单号结账
图3.8结账界面
4、具体实现
前台程序设计
4.1Cdb类:
实现C#与数据库连接,调用相应存储过程
publicclassCdb
{
privatestringappsettingk1=System.Configuration.ConfigurationManager.AppSettings["
k1"
];
privateSqlConnectionconn=null;
publicCdb()
{
conn=newSqlConnection(appsettingk1);
}
publicDataSetgetDataset(Stringstorename,SqlParameter[]parameters)
SqlCommandcmd=newSqlCommand(storename,conn);
cmd.CommandType=CommandType.StoredProcedure;
SqlDataAdapterad=newSqlDataAdapter(cmd);
DataSetds=newDataSet();
if(parameters!
=null)
{
for(inti=0;
i<
parameters.Length;
i++)
{
cmd.Parameters.Add(parameters[i]);
}
}
ad.Fill(ds);
returnds;
publicintExcuteStore(Stringstorename,SqlParameter[]parameters)
conn.Open();
try
cmd.ExecuteNonQuery();
return0;
catch(Exceptionk)
stringm=k.Message;
return-1;
finally
conn.Close();
}
4.2登陆界面:
publiclogin()
InitializeComponent();
privatevoidbutton1_Click(objectsender,EventArgse)
if(textUid.Text=="
"
||textPwd.Text=="
)
MessageBox.Show("
请输入用户名和密码"
);
return;
Business.CtablesAdmindb=new_1217.Business.CtablesAdmin();
if(db.login(textUid.Text,textPwd.Text)==1)
超级用户"
this.Hide();
Mainm2=newMain();
m2.ShowDialog();
if(db.login(textUid.Text,textPwd.Text)==0)
普通用户,请通过PID登陆!
if(db.login(textUid.Text,textPwd.Text)==-1)
对不起,您没有访问权限!
privatevoidbutton2_Click(objectsender,EventArgse)
Application.Exit();
4.3食物类型管理、食物管理、开台、结账
//添加食物类型
privatevoidbutton1_Click(objectsender,EventArgse)
if(textBox1.Text=="
{
MessageBox.Show("
不能为空!
return;
}
Business.CtablesAdmintb=new_1217.Business.CtablesAdmin();
if(tb.addfoodtype(textBox1.Text)==0)
{
添加成功"
bindGridView();
}
}
//删除食物类型
privatevoiddataGridView1_CellContentClick(objectsender,DataGridViewCellEventArgse)
if(e.ColumnIndex==0)
{
if(MessageBox.Show("
确定要删除吗,若删除则会删除该类下所有的菜名!
"
MessageBoxButtons.OKCancel,MessageBoxIcon.Warning)==DialogResult.Cancel)
{
return;
}
inttypeid=int.Parse(dataGridView1.SelectedCells[1].Value.ToString());
if(tb.delfoodtype(typeid)==0)
MessageBox.Show("
删除成功!
bindGridView();
else
MessageBox.Show("
删除失败!
}
}
//添加食物
if(textname.Text=="
||textunite.Text=="
||foodtype.Text=="
)
填写不完整,请重新输入!
Business.CtablesAdmintb1=new_1217.Business.CtablesAdmin();
Business.CtablesAdmintb2=new_1217.Business.CtablesAdmin();
intc=int.Parse(tb2.atypeid(foodtype.Text).Rows[0][0].ToString());
if(tb1.addfood(c,textname.Text,textunite.Text,textprice.ToString())==0)
食物添加成功!
bindGridView1();
else
食物添加失败!
//删除食物?
privatevoiddataGridView1_CellContentClick(objectsender,DataGridViewCellEventArgse)
dataGridView1.AutoGenerateColumns=false;
if(MessageBox.Show("
确定要删除吗?
”,”提示"
MessageBoxButtons.OKCancel,MessageBoxIcon.Warning)==DialogResult.Cancel)
intfoodid=int.Parse(dataGridView1.SelectedCells[1].Value.ToString());
Business.CtablesAdmintb=new_1217.Business.CtablesAdmin();
if(tb.delfoodtype(foodid)==0)
MessageBox.Show("
删除成功"
bindGridView1();
else
删除失败"
//开台
if(numbers.Text=="
请输入用餐人数"
intuid=int.Parse(comboBox1.SelectedValue.ToString());
if(uid==0)
请选择服务员"
Business.CtablesAdmint=newCtablesAdmin();
t.usetable1(dateTimePicker1.Text,int.Parse(numbers.Text),_tid,comboBox1.SelectedValue.ToString());
t.upstatus(_tid);
保存成功"
this.Close();
privatevoid取消开台ToolStripMenuItem_Click(objectsender,EventArgse)
if(listView1.SelectedItems.Count!
=1)
请选择一张桌子"
stringtid=listView1.SelectedItems[0].SubItems[1].Text;
Business.CtablesAdmint=new_1217.Business.CtablesAdmin();
if(t.cancleusetable(tid)==0)
Business.CtablesAdminb=newBusiness.CtablesAdmin();
b.cancleusetable(tid);
b.updatestatus(tid);
取消成功"
4.4点菜、结账
//点菜
privatevoidbutton2_Click(objectsender,EventArgse)
if(textBox2.Text=="
||textBox3.Text=="
||textBox4.Text=="
||textBox5.Text=="
请填写完整"
if(comboBox1.Text=="
请选择"
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 餐饮 管理 系统 报告