




已阅读5页,还剩11页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
餐饮管理系统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)用户密码16用户信息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, linepri
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 煤矿定量合同范本
- 医院分成协议合同范本
- 征地拆迁合同范本
- 供货渠道合同范本
- 新余小升初房屋合同范本
- 大牌代工合同范本
- 门窗员工安全合同范本
- 车位充电租赁合同范本
- cfg桩施工合同范本
- 代付协议合同范本
- 老旧小区综合整治项目成品保护和工程保修的管理措施
- 西安26中小升初分班考试语文真题
- 2024年深圳技能大赛-电工职业技能竞赛理论考试题库-上(单选题)
- 机关食堂从业人员培训
- 高中英语考纲3500词之核心词汇讲与练
- 2024光伏并网柜技术规范
- 品质异常检讨
- 《应用光伏学》课程教学大纲(新能源材料与器件专业)
- 劳动仲裁申请书模板2
- GB/T 24633.1-2024产品几何技术规范(GPS)圆柱度第1部分:词汇和参数
- 护理工作中的人文关怀
评论
0/150
提交评论