C#窗體實現(xiàn)點餐系統(tǒng)
本文實例為大家分享了C#窗體實現(xiàn)點餐系統(tǒng)的具體代碼,供大家參考,具體內(nèi)容如下
一、概述
美食行業(yè)現(xiàn)如今也越利用信息化技術(shù)來提高點餐的效率和質(zhì)量,小小的一個系統(tǒng)不僅可以提高餐廳的檔次,也減輕了服務(wù)員的工作量,有效的減少了因為人工點菜而容易產(chǎn)生的錯誤,.....
該系統(tǒng)屬于簡易版的,適用于初學(xué)者學(xué)習(xí),主要功能有以下幾個模塊:1、用戶管理;2、菜單管理;3、點餐管理等。具體請詳看下面的截圖
二、開發(fā)環(huán)境
語言:C#
數(shù)據(jù)庫:SQLServer 2008 R2
開發(fā)工具:Visual Studio 2015
注:對于開發(fā)環(huán)境并非僅此一種,其他的也OK
三、部分截圖展示









Tips
簡易版的點餐管理系統(tǒng)基本呈現(xiàn)在上圖所示
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
?
namespace 點餐管理系統(tǒng)
{
? ? public partial class FormMain : Form
? ? {
? ? ? ? public string constr = ConfigurationManager.ConnectionStrings["sqlserver"].ConnectionString;
? ? ? ? public ?string UserId = "";
? ? ? ? public FormMain()
? ? ? ? {
? ? ? ? ? ? InitializeComponent();
? ? ? ? }
? ? ??
? ? ? ? private void 用戶列表ToolStripMenuItem_Click(object sender, EventArgs e)
? ? ? ? {
? ? ? ? ? ? FormUserInfo frm = new FormUserInfo();
? ? ? ? ? ? frm.MdiParent = this;
? ? ? ? ? ? frm.StartPosition = FormStartPosition.CenterScreen;
? ? ? ? ? ? frm.constr = constr;
? ? ? ? ? ? frm.UserName = UserId;
? ? ? ? ? ? frm.Show();
? ? ? ? }
?
? ? ? ? private void 密碼修改ToolStripMenuItem_Click(object sender, EventArgs e)
? ? ? ? {
? ? ? ? ? ? ChangePassword frm = new ChangePassword(UserId);
? ? ? ? ? ? frm.MdiParent = this;
? ? ? ? ? ? frm.StartPosition = FormStartPosition.CenterScreen;
? ? ? ? ? ? frm.constr = constr;
? ? ? ? ? ? frm.Show();
? ? ? ? }
?
? ? ? ? private void 菜單信息ToolStripMenuItem_Click(object sender, EventArgs e)
? ? ? ? {
? ? ? ? ? ? FormRoomInfo frm = new FormRoomInfo();
? ? ? ? ? ? frm.MdiParent = this;
? ? ? ? ? ? frm.StartPosition = FormStartPosition.CenterScreen;
? ? ? ? ? ? frm.constr = constr;
? ? ? ? ? ? frm.UserName = UserId;
? ? ? ? ? ? frm.Show();
? ? ? ? }
?
? ? ? ? private void 點餐管理ToolStripMenuItem_Click(object sender, EventArgs e)
? ? ? ? {
? ? ? ? ? ? FormCustomerInfo frm = new FormCustomerInfo();
? ? ? ? ? ? frm.MdiParent = this;
? ? ? ? ? ? frm.StartPosition = FormStartPosition.CenterScreen;
? ? ? ? ? ? frm.constr = constr;
? ? ? ? ? ? frm.UserName = UserId;
? ? ? ? ? ? frm.Show();
? ? ? ? }
?
? ? ? ? private void 關(guān)于系統(tǒng)ToolStripMenuItem_Click(object sender, EventArgs e)
? ? ? ? {
? ? ? ? ? ? FormAbout frm = new FormAbout();
? ? ? ? ? ? frm.MdiParent = this;
? ? ? ? ? ? frm.StartPosition = FormStartPosition.CenterScreen;
? ? ? ? ? ? frm.Show();
? ? ? ? }
?
? ? ? ? private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
? ? ? ? {
? ? ? ? ? ? Application.Exit();
? ? ? ? }
? ? }
}以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

