当前位置: 首页 > news >正文

优质的成都网站建设推广单县网站建设

优质的成都网站建设推广,单县网站建设,网站建设教程 湖南岚鸿,银川网站制作一、引言 餐饮收银系统是一种用于管理餐馆、咖啡厅、快餐店等餐饮业务的计算机化工具。它旨在简化点餐、结账、库存管理等任务#xff0c;提高运营效率#xff0c;增强客户体验#xff0c;同时提供准确的财务记录。C# 餐饮收银系统是一种使用C#编程语言开发的餐饮业务管理软…一、引言 餐饮收银系统是一种用于管理餐馆、咖啡厅、快餐店等餐饮业务的计算机化工具。它旨在简化点餐、结账、库存管理等任务提高运营效率增强客户体验同时提供准确的财务记录。C# 餐饮收银系统是一种使用C#编程语言开发的餐饮业务管理软件具有以下主要功能 二、需求分析 分析思维导图 三、程序截图 登录 管理员主界面 添加食物界面 服务员订单界面 修改食物详情界面 未完成订单界面 支付成功界面 四、程序说明 管理员账号和密码admin, admin 服务员账号和密码: test, test 注可自行注册账号并登录但是只能注册服务员账号 五、代码 AdminWindows.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes;namespace Cashier {/// summary/// AdminWindow.xaml 的交互逻辑/// /summarypublic partial class AdminWindow : Window{public AdminWindow(){InitializeComponent();frame.Source new Uri(MenuEditPage.xaml, UriKind.Relative);}private void textBlock2_Copy_Click(object sender, RoutedEventArgs e){Button btn sender as Button;String choice btn.Content.ToString();switch (choice){case 菜单编辑:LoadMenuEditPage();break;case 添加食物:LoadAddFoddPage();break;case 食物编辑:LoadFoodEditPage();break;case 已完成订单:LoadOderCompletedPage();break;case 未完成订单:LoadOderNotPage();break;}}private void LoadMenuEditPage(){frame.Source new Uri(MenuEditPage.xaml, UriKind.Relative);}private void LoadAddFoddPage(){frame.Source new Uri(AddFoodPage.xaml, UriKind.Relative);}private void LoadOderCompletedPage(){frame.Source new Uri(OderCompletedPage.xaml, UriKind.Relative);}private void LoadOderNotPage(){frame.Source new Uri(OderNotPage.xaml, UriKind.Relative);}private void LoadFoodEditPage(){frame.Source new Uri(FoodEditPage.xaml, UriKind.Relative);}} } AddFoodPage.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using MySql.Data.MySqlClient; namespace Cashier {/// summary/// AddFoodPage.xaml 的交互逻辑/// /summary/// public partial class AddFoodPage : Page{private String mysqlConnStr serverlocalhost;User Idroot;password;Databasecanyin;public AddFoodPage(){InitializeComponent();}private void btn_Click(object sender, RoutedEventArgs e){InsertFood();}private void InsertFood(){String foodName foodNameBox.Text.ToString();String price priceBox.Text.ToString();String category categoryBox.Text;if(foodName.Equals() || price.Equals() || category.Equals()){resultBox.Text 请将食物信息填写完整;return;}// MessageBox.Show(食物名称是 foodName , 价格是 price 种类是 category);try{MySqlConnection conn new MySqlConnection(mysqlConnStr);conn.Open();String cmd insert into food(name, price, category) values( foodName , price , category );MySqlCommand mycmd new MySqlCommand(cmd, conn);if (mycmd.ExecuteNonQuery() 0){ resultBox.Text 食品添加成功;foodNameBox.Text ;priceBox.Text ;categoryBox.Text ;conn.Close();}}catch (Exception e){resultBox.Text 食品添加失败 e.Message;}}} } CommonValue.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;namespace Cashier {class CommonValue{public static int EDIT_FOOD_ID 5;public static String mysqlConectString serverlocalhost;User Idroot;password;Databasecanyin;public static String USER_NAME;public static int FOOD_PAY_ID 556;} } MainWindows.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using MySql.Data.MySqlClient;namespace Cashier {/// summary/// MainWindow.xaml 的交互逻辑/// /summarypublic partial class MainWindow : Window{//用户账户private String user;private String password;public MainWindow(){InitializeComponent();}private void richTextBox_TextChanged(object sender, TextChangedEventArgs e){}private void textBox_TextChanged(object sender, TextChangedEventArgs e){}//监听注册按钮private void button1_Click(object sender, RoutedEventArgs e){Button btn sender as Button;String choice btn.Content.ToString();switch (choice){case 登录:UserLogin();break;case 注册:UserRegister();break;}}private void button1_Click_1(object sender, RoutedEventArgs e){}private void UserLogin(){//用户登录的逻辑代码user userBox.Text.ToString();password passwordBox.Text.ToString();if(user.Equals()){MessageBox.Show(请输入用户名);}else if(password.Equals()){MessageBox.Show(请输入密码);}else{CheckInfoAndLogin();}}private void UserRegister(){//跳转到登陆界面RegisterWindow register new RegisterWindow();register.Show();this.Close();}//检查用户的数据如果查询失败则返回密码错误private void CheckInfoAndLogin(){try{ MySqlConnection conn new MySqlConnection(CommonValue.mysqlConectString);conn.Open();string cmd select * from user where user user ;MySqlCommand myCmd new MySqlCommand(cmd, conn);MySqlDataReader reader myCmd.ExecuteReader();reader.Read();string dbUser reader[user].ToString();string dbPassword reader[password].ToString();if (password.Equals(dbPassword) dbUser.Equals(admin)){OpenAdminWindow();CommonValue.USER_NAME user;}else if (password.Equals(dbPassword)){OpenWaiterWindow();CommonValue.USER_NAME user;}else{MessageBox.Show(密码输入错误请重新输入!);}conn.Close();}catch(Exception e){String msg e.Message;MessageBox.Show(数据库连接错误 msg);}}//打开管理员窗口private void OpenAdminWindow(){AdminWindow aw new AdminWindow();aw.Show();this.Close();}//打开服务员窗口private void OpenWaiterWindow(){WaiterWindow ww new WaiterWindow();ww.Show();this.Close();}} } OderNotPage.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using MySql.Data.MySqlClient; using System.Data.SqlClient; using System.Data;namespace Cashier {/// summary/// OderNotPage.xaml 的交互逻辑/// /summarypublic partial class OderNotPage : Page{public OderNotPage(){InitializeComponent();ShowOders();}private void ShowOders(){try{//获取表格DataTable data new DataTable(oder);data.Columns.Add(new DataColumn(oder_id, typeof(string)));data.Columns.Add(new DataColumn(sum, typeof(string)));MySqlConnection conn new MySqlConnection(CommonValue.mysqlConectString);conn.Open();string cmd select * from oder where complete0;MySqlCommand myCmd new MySqlCommand(cmd, conn);MySqlDataAdapter mda new MySqlDataAdapter(cmd, conn);MySqlDataReader reader myCmd.ExecuteReader();while (reader.Read()){string id reader[oder_id].ToString();string name reader[sum].ToString();data.Rows.Add(id, name);}listView.DataContext data.DefaultView;conn.Close();}catch (Exception e){MessageBox.Show(查询订单失败: e.Message);}}private void button_Click(object sender, RoutedEventArgs e){CommonValue.FOOD_PAY_ID int.Parse(idPayBox.Text.ToString());NavigationWindow window new NavigationWindow();window.Source new Uri(OderDetailPage.xaml, UriKind.Relative);window.Show();}} } 六、交流与联系 q:969060742 文档、完整代码、sql、程序资源
http://www.zqtcl.cn/news/306795/

相关文章:

  • 仙居住房和城乡建设局网站用手机看网站源代码
  • 网架加工厂家seo关键词优化推广报价表
  • 开发新闻类网站门户网站搭建方案
  • 东莞网站搭建建站公司wordpress+链接跳转
  • 福州网站设计软件公司学校网站源码wordpress
  • 网站seo推广优化报价表广州哪个区封了
  • 网站第三方统计代码网页设计图片大小
  • 网上推广网站夸克搜索引擎
  • 什么是网站根目录做动态图片下载哪个网站好
  • 花钱让别人做的网站版权是谁的o2o网站建设如何
  • 电子商务网站建设策划书的流程wordpress原理
  • 微信公众号文章排版设计软媒win7优化大师
  • 长春建设局网站处长做箱包关注哪个网站
  • 中国建筑集团有限公司怎么样seo是怎么优化推广的
  • 芜湖建设网站eclipse开发网站用vue做前端
  • 外贸网站推广制作教程wordpress留言页面模版
  • 手机网站 像素网站建设生意怎么样
  • html5网站源代码凡科互动app下载
  • asp评价网站开发文档福州做网站的哪家好
  • 合肥网站建设方案优化写作网站大全
  • 专门提供做ppt小素材的网站网站定位
  • 临沂市建设局兰山区网站wordpress 去除下划线
  • 如何做一张图片的网站关于实验室建设的英文网站
  • 网站建设文本居中代码山东网站推广营销设计
  • 山东桓台建设招投标网站北京建设信息港网站
  • 为什么网站要域名个人养老金制度最新消息
  • 公众号开发是不是网站开发公司网站建设分录
  • 云南省住房建设厅网站代理二级分销系统
  • 四川建设人才培训网站临沂网站制作页面
  • 用vue做网站建设工程合同属于什么合同