餐饮管理系统实训报告.doc

上传人:jian****018 文档编号:9363439 上传时间:2020-04-05 格式:DOC 页数:16 大小:558KB
返回 下载 相关 举报
餐饮管理系统实训报告.doc_第1页
第1页 / 共16页
餐饮管理系统实训报告.doc_第2页
第2页 / 共16页
餐饮管理系统实训报告.doc_第3页
第3页 / 共16页
点击查看更多>>
资源描述
餐饮管理系统1、绪论 近年来,随着人们生活水平的不断提高,餐饮业的消费持续增长,竞争越来越激烈。然而,传统餐饮企业的日常运作是靠人工管理,从原材料入库到客人点单,再到结账基本上由人工完场记录,这样不仅耗费人力资源而且容易导致记录丢失或重复等错误,造成管理水平低下。2、需求分析本系统应用计算机对餐饮企业信息进行管理,具有手工管理所无法比拟多的优点,极大地提高了信息管理的效率。本系统运用Microsoft SQL Server2005为后台数据库,以C#为前台开发工具,系统实现了前台管理、食物类型管理、食物管理、桌台管理、开台信息、点菜、结账的功能。餐厅管理部分:实现菜单类别管理、菜式管理、桌台管理和预订管理。菜单类别管理:实现食物类别的添加和删除,删除时要将此食物类别下的食物一并删除(给出用户提示);菜式管理:实现菜式的添加和删除;3、设计3.1 数据库设计数据表设计用户表W_user表:列名:类型说明备注UseridNvarchar(50)用户ID主键UsernameNvarchar(50)用户名UseridentityNvarchar(50)身份证User_birthdayDate生日PhoneNvarchar(50)电话GenderInt性别UseraddressNvarchar(50)地址UsertypeInt用户类型0为普通用户,1为超级管理员PwdNvarchar(50)用户密码用户信息W_user用户ID地址用户名性别电话用户类型用户密码身份证生日桌子表W_table表列名:类型说明备注TidNvarchar(50)桌子编号主键TnameNvarchar(50)餐桌名PositionNvarchar(100)餐桌位置DescribeNvarchar(500)描述Statusint1正在使用,0为空闲桌子信息w_table桌子编号餐桌名餐桌位置餐桌状态描述开台记录(用餐记录)W_orders表列名:类型说明备注OrderedInt订单ID主键_timeNvarchar(50)用餐时间 或者预定用餐时间NumbersInt用餐人数TidNvarchar(50)外键,来自w_tableUseridNvarchar(50)接待人员外键,来自W_USERAmountDecimal(18,2)实收金额开台记录W_orders用餐时间用餐人数订单ID实收金额接待人员桌台号客户用餐明细W_guestfood表列名:类型说明备注IdInt自增主键FoodidInt外键,来自w_foodNumberint数量RemarkNvarchar(50)备注Orderedint订单IDLinepriceDecimal(18,2)行计算价UseridNvarchar(50)服务人员客户用餐明细信息W_guestfood食物编号系统编号数量订单号备注服务人员行计价食物类型W_foodtype表列名:类型说明备注TypeidInt食物类别ID主键FoodtypeNvarchar(50)食物类别名食物类别信息表w_foodtype类别名食物类别餐厅食物W_food表列名:类型说明备注FoodidInt食物ID主键TypeidInt食物类别IDFoodnameNvarchar(50)名称FoodpriceNvarchar(50)价格UniteNvarchar(50)单位餐厅食物W_food食物ID单位食物类别IDI名称价格超级用户进入主窗体系统登录结束 图1 业务流程图餐饮管理系统订餐管理用户管理退出退出桌台管理食物管理食物类型管理 图2 餐饮管理系统功能结构图3.2前台设计3.2.1登陆界面:功能:用户可以通过此界面登陆系统 图3.1 登陆界面3.2.2 main界面的实现功能:前台管理,实现各种界面管理,可以通过图片信息查看桌子是否已使用,也可选中图标单击右键选择相应业务 图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#与数据库连接,调用相应存储过程public class Cdbprivate string appsettingk1=System.Configuration.ConfigurationManager.AppSettingsk1; private SqlConnection conn = null; public Cdb() conn = new SqlConnection(appsettingk1); public DataSet getDataset(String storename, SqlParameter parameters) SqlCommand cmd = new SqlCommand(storename, conn); cmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter ad = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); if (parameters != null) for (int i = 0; i parameters.Length; i+) cmd.Parameters.Add(parametersi); ad.Fill(ds); return ds; public int ExcuteStore(String storename, SqlParameter parameters) conn.Open(); SqlCommand cmd = new SqlCommand(storename, conn); cmd.CommandType = CommandType.StoredProcedure; if (parameters != null) for (int i = 0; i parameters.Length; i+) cmd.Parameters.Add(parametersi); try cmd.ExecuteNonQuery(); return 0; catch (Exception k) string m = k.Message; return -1; finally conn.Close(); 4.2登陆界面:public login() InitializeComponent(); private void button1_Click(object sender, EventArgs e) if (textUid.Text = | textPwd.Text = ) MessageBox.Show(请输入用户名和密码); return; Business.CtablesAdmin db = new _1217.Business.CtablesAdmin(); if (db.login(textUid.Text, textPwd.Text) = 1) MessageBox.Show(超级用户); this.Hide(); Main m2 = new Main(); m2.ShowDialog(); if (db.login (textUid .Text ,textPwd .Text )=0) MessageBox.Show(普通用户,请通过PID登陆!); if (db.login(textUid.Text, textPwd.Text) = -1) MessageBox.Show(对不起,您没有访问权限!); private void button2_Click(object sender, EventArgs e) Application.Exit(); 4.3食物类型管理、食物管理、开台、结账/添加食物类型private void button1_Click(object sender, EventArgs e) if (textBox1.Text = ) MessageBox.Show(不能为空!); return; Business.CtablesAdmin tb = new _1217.Business.CtablesAdmin(); if (tb.addfoodtype(textBox1.Text) = 0) MessageBox.Show(添加成功); bindGridView(); /删除食物类型private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)if (e.ColumnIndex = 0) if (MessageBox.Show(确定要删除吗,若删除则会删除该类下所有的菜名!,添加成功MessageBoxButtons.OKCancel, MessageBoxIcon.Warning)=DialogResult .Cancel ) return; int typeid= int.Parse(dataGridView1.SelectedCells1.Value.ToString(); Business.CtablesAdmin tb = new _1217.Business.CtablesAdmin(); if (tb.delfoodtype(typeid) = 0) MessageBox.Show(删除成功!); bindGridView(); else MessageBox.Show(删除失败!); /添加食物 private void button1_Click(object sender, EventArgs e) if (textname.Text = | textunite.Text = |foodtype.Text = ) MessageBox.Show(填写不完整,请重新输入!); return; Business.CtablesAdmin tb1 = new _1217.Business.CtablesAdmin(); Business.CtablesAdmin tb2 = new _1217.Business.CtablesAdmin(); int c = int.Parse(tb2.atypeid(foodtype.Text).Rows00.ToString(); if (tb1.addfood(c,textname.Text, textunite.Text, textprice.ToString() = 0) MessageBox.Show(食物添加成功!); bindGridView1(); else MessageBox.Show(食物添加失败!); /删除食物? private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) dataGridView1.AutoGenerateColumns = false; if (MessageBox.Show(确定要删除吗?”,”提示, MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) = DialogResult.Cancel) return; else int foodid = int.Parse(dataGridView1.SelectedCells1.Value.ToString(); Business.CtablesAdmin tb = new _1217.Business.CtablesAdmin(); if (tb.delfoodtype(foodid) = 0) MessageBox.Show(删除成功); bindGridView1(); else MessageBox.Show(删除失败); /开台private void button1_Click(object sender, EventArgs e) if (numbers.Text = ) MessageBox.Show(请输入用餐人数); int uid = int.Parse(comboBox1.SelectedValue.ToString(); if (uid = 0) MessageBox.Show(请选择服务员); return; Business.CtablesAdmin t = new CtablesAdmin(); t.usetable1(dateTimePicker1.Text, int.Parse(numbers.Text), _tid, comboBox1.SelectedValue.ToString(); t.upstatus(_tid); MessageBox.Show(保存成功); this.Close(); private void 取消开台ToolStripMenuItem_Click(object sender, EventArgs e) if (listView1.SelectedItems.Count != 1) MessageBox.Show(请选择一张桌子); return; string tid = listView1.SelectedItems0.SubItems1.Text; Business.CtablesAdmin t = new _1217.Business.CtablesAdmin(); if (t.cancleusetable(tid) = 0) Business.CtablesAdmin b = new Business.CtablesAdmin(); b.cancleusetable(tid); b.updatestatus(tid); MessageBox.Show(取消成功); 4.4点菜、结账/点菜private void button2_Click(object sender, EventArgs e) if (textBox2.Text = | textBox3.Text = | textBox4.Text = | textBox5.Text = ) MessageBox.Show(请填写完整); return; if (comboBox1.Text = 请选择) MessageBox.Show(请填写服务人员); return; Business.CtablesAdmin t = new _1217.Business.CtablesAdmin(); dataGridView1.DataSource = t.getorder(int.Parse(this.id.ToString(); common.Cdb c = new common.Cdb(); DataSet dt = c.getDataset(getorder,new SqlParameter new SqlParameter(ordered,id); common.Cdb ss = new common.Cdb(); int aa = int.Parse(ss.getDataset(addorder,new SqlParameternew SqlParameter(tid,id).Tables0.Rows00.ToString();/获取订单号? float lineprice = float.Parse(textBox4.Text.ToString() * int.Parse(textBox5.Text.ToString(); int foodid = int.Parse(treeView1.SelectedNode.Tag.ToString(); string ud = comboBox1.SelectedValue.ToString(); t.guestfood(foodid, int.Parse(textBox5.Text), textBox6.Text, aa, lineprice.ToString(), ud); MessageBox.Show(保存成功); /结账 private void button1_Click(object sender, EventArgs e) Business.CtablesAdmin t = new Business.CtablesAdmin(); int s=int.Parse(t.selectordered(ttid).Rows00.ToString(); decimal b = decimal.Parse(t.getsum(s).Rows00.ToString(); Business.CtablesAdmin tt = new Business.CtablesAdmin(); tt.updatestatus(ttid); tt.jiezhang(b,s); MessageBox.Show(结账成功!); 5、总结此餐饮管理系统经过三个周基本完成,实现了餐饮管理系统的基本功能,操作简便方便,基本实现了前台管理、食物类型管理、食物管理、开台信息、点菜、结账等基本功能。经过这三周的实训,培养了我动手创新的能力,在实践中检验了我对知识的掌握能力以及运用能力。同时通过本次实训课让我了解解决实际问题的过程,并提高了我的专业技能,使我把所学的理论知识与实际能力紧密的结合在一起。最重要的是我初步具有了科研意识,我的查找资料,运用资料,完成工程的能力都有了一定提高,为我后继课程的学习打下了坚实的基础。这次实训我的系统没有做到最完善,我认为是我对专业知识的掌握还不够,经过这次实训,我认识到自己的很多不足,需要以后加大努力,弥补缺陷。以后我一定会努力,继续学习,是自己能够更加完善。6、参考文献数据库技术及应用 中国石油大学出版社C#从入门到精通 清华大学出版社
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 管理文书 > 工作总结


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!