(餐饮管理)餐厅管理摘要..

上传人:管****问 文档编号:137826928 上传时间:2020-07-12 格式:DOC 页数:51 大小:272.65KB
返回 下载 相关 举报
(餐饮管理)餐厅管理摘要.._第1页
第1页 / 共51页
(餐饮管理)餐厅管理摘要.._第2页
第2页 / 共51页
(餐饮管理)餐厅管理摘要.._第3页
第3页 / 共51页
(餐饮管理)餐厅管理摘要.._第4页
第4页 / 共51页
(餐饮管理)餐厅管理摘要.._第5页
第5页 / 共51页
点击查看更多>>
资源描述

《(餐饮管理)餐厅管理摘要..》由会员分享,可在线阅读,更多相关《(餐饮管理)餐厅管理摘要..(51页珍藏版)》请在金锄头文库上搜索。

1、餐厅消费管理系统民以食为天,学生餐厅就餐,在人流的高峰期拿着钱去就餐的话服务员忙着找零钱都非常不方便,再一点每个人吃饭时手里拿着钱也是不卫生的,餐厅管理系统是为方便管理学生就餐而设计的。首先餐厅只需一个收银员管理充钱和办理餐卡的信息管理,而不需要每个餐厅都自己配备一个专门找零钱工,并且也方便学校对学生在校的就餐情况的了解。本系统主要用 C#语言为基础编程语言,运用Microsoft Visual Studio 2005设计前台界面,运用Microsoft Office Access 2003作为后台数据库,运用c#设计与数据库连接的接口,方便简洁的操作就能很好的管理数据库系统。一、 建立一个类

2、:建立数据库库连接和数据库读取方法。public OleDbConnection conn() OleDbConnection myco = new OleDbConnection(); string mystr = Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|学生信息.mdb; myco.ConnectionString = mystr; myco.Open(); return myco; public bool sread(string sql) conn(); OleDbCommand mycmd = new O

3、leDbCommand(sql,conn (); OleDbDataReader myreader = mycmd.ExecuteReader(); if (myreader.Read() return true; else return false; 二、建设登陆界面:账号和登录密码:登陆界面中的账号和密码都要和事先前建立的数据库相连接,要建立许多messagebox信息提示确保解决用户在登录所遇到的问题。public partial class 登陆界面 : Form public 登陆界面() InitializeComponent(); data da = new data(); pr

4、ivate void 登陆_Click(object sender, EventArgs e) try da.conn(); string pass; pass = select * from 登陆 where 卡号= + 账号.Text + and 密码= + 密码.Text + ; if (da.sread(pass) this.DialogResult = DialogResult.OK; this.Close(); else MessageBox.Show(用户名或密码错误,请重新输入!); 密码.Clear(); 密码.Clear(); 密码.Focus(); catch (Exce

5、ption error) MessageBox.Show(error.Message); ; private void 退出_Click(object sender, EventArgs e) this.Close(); private void groupBox2_Enter(object sender, EventArgs e) private void timer1_Tick(object sender, EventArgs e) label3.Left = label3.Left - 3; if (label3.Right 0) label3.Left = this.Width; pr

6、ivate void 账号_KeyPress(object sender, KeyPressEventArgs e) if (e.KeyChar=13) 密码.Focus(); private void 密码_KeyPress(object sender, KeyPressEventArgs e) if (e.KeyChar = 13) 登陆.Focus(); 三、主页面:输入卡号就能查询用户的余额状况,和进行对用户充值和消费金额public partial class index : Form public index() InitializeComponent(); data da = n

7、ew data(); private void 信息查询ToolStripMenuItem_Click(object sender, EventArgs e) Form f1 = new 信息查询(); f1.ShowDialog(); private void 信息管理ToolStripMenuItem_Click(object sender, EventArgs e) Form f2 = new 信息管理(); f2.ShowDialog(); private void f_Load(object sender, EventArgs e) Form f1 = new 登陆界面 (); f1

8、.ShowDialog(); if (f1.DialogResult = DialogResult.OK) else this.Close(); private void button3_Click(object sender, EventArgs e) if (textBox3.Text = ) MessageBox.Show(卡号为空请输入卡号!, 信息提示!); else da.conn(); string sql = select 卡号 From 信息 where 卡号= + textBox3.Text + ; OleDbCommand mycmd = new OleDbCommand

9、(); mycmd.CommandText = sql; mycmd.Connection = da.conn(); OleDbDataReader myreader = mycmd.ExecuteReader(); if (myreader.Read() try da.conn(); string mysql; mysql = select * from 信息 where 卡号 = + textBox3.Text + ; OleDbCommand mycomd = new OleDbCommand(); mycomd.CommandText = mysql; mycomd.Connection = da.conn(); OleDbDataReader myreaderq = mycomd.ExecuteReader(); while (myreaderq.Read() textBox1.Text = myreaderq8.ToString();

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 商业/管理/HR > 企业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号