餐饮管理系统代码.doc_第1页
餐饮管理系统代码.doc_第2页
餐饮管理系统代码.doc_第3页
餐饮管理系统代码.doc_第4页
餐饮管理系统代码.doc_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

餐饮管理系统代码1 using System;2using System.Collections.Generic;3using System.ComponentModel;4using System.Data;5using System.Drawing;6using System.Text;7using System.Windows.Forms;8using System.Collections;9namespace 餐饮管理系统10.11 public partial class frmManagement : Form12 .13 ArrayList RoomStatus = new ArrayList();14 ArrayList VipClass = new ArrayList();15 public frmManagement()16 .17 InitializeComponent();18 1920 private void 房间类型BindingNavigatorSaveItem_Click(object sender, EventArgs e)21 .22 this.Validate();23 this.房间类型BindingSource.EndEdit();24 this.房间类型TableAdapter.Update(this.dieteticManagementDataSet.房间类型);25 2627 private void frmManagement_Load(object sender, EventArgs e)28 .29 / TODO: 这行代码将数据加载到表“dieteticManagementDataSet.管理员”中。您可以根据需要移动或移除它。30 this.管理员TableAdapter.Fill(this.dieteticManagementDataSet.管理员);31 / TODO: 这行代码将数据加载到表“dieteticManagementDataSet.Vip”中。您可以根据需要移动或移除它。32 this.vipTableAdapter.Fill(this.dieteticManagementDataSet.Vip);33 34 / TODO: 这行代码将数据加载到表“dieteticManagementDataSet.餐牌”中。您可以根据需要移动或移除它。35 this.餐牌TableAdapter.Fill(this.dieteticManagementDataSet.餐牌);36 / TODO: 这行代码将数据加载到表“dieteticManagementDataSet.食品类别”中。您可以根据需要移动或移除它。37 this.食品类别TableAdapter.Fill(this.dieteticManagementDataSet.食品类别);38 / TODO: 这行代码将数据加载到表“dieteticManagementDataSet.商品”中。您可以根据需要移动或移除它。3940 / TODO: 这行代码将数据加载到表“dieteticManagementDataSet.餐房”中。您可以根据需要移动或移除它。41 this.餐房TableAdapter.Fill(this.dieteticManagementDataSet.餐房);42 / TODO: 这行代码将数据加载到表“dieteticManagementDataSet.房间类型”中。您可以根据需要移动或移除它。43 this.房间类型TableAdapter.Fill(this.dieteticManagementDataSet.房间类型);44 VipClass.Add(普通会员);45 VipClass.Add(中级会员);46 VipClass.Add(高级会员);47 RoomStatus.Add(可供);48 RoomStatus.Add(预订);49 RoomStatus.Add(占用);50 RoomStatus.Add(停用);51 RoomStatus.Add(脏台);52 性别ComboBox.Items.Add(男);53 性别ComboBox.Items.Add(女);54 级别ComboBox.Items.Clear();55 foreach (string s in VipClass)56 级别ComboBox.Items.Add(s);57 餐台状态ComboBox.Items.Clear();58 foreach (string s in RoomStatus)59 餐台状态ComboBox.Items.Add(s);60 string sdata = Program.DBOpertor.GetRoomClass();61 房间类型ComboBox.Items.Clear();62 for (int i = 0; i sdata.Length; i+)63 房间类型ComboBox.Items.Add(sdatai);64 6566 private void 餐房BindingNavigatorSaveItem_Click(object sender, EventArgs e)67 .68 this.Validate();69 this.餐房BindingSource.EndEdit();70 this.餐房TableAdapter.Update(this.dieteticManagementDataSet.餐房);71 7273 private void Add_Click(object sender, EventArgs e)74 .75 /new frmAddAndModification(餐房DataGridView, this.dieteticManagementDataSet.餐房).Show();7677 frm餐房 f=new frm餐房(this.dieteticManagementDataSet.餐房,Add);78 foreach (string s in RoomStatus)79 f.餐台状态ComboBox.Items.Add(s);80 string sdata = Program.DBOpertor.GetRoomClass();81 for (int i = 0; i sdata.Length; i+)82 f.房间类型ComboBox.Items.Add(sdatai);83 f.ShowDialog();84 / f.Dispose();85 8687 private void Delete_Click(object sender, EventArgs e)88 .89 if (MessageBox.Show(确定要删除吗?, 删除确定, MessageBoxButtons.YesNo) = DialogResult.Yes)90 .91 string no = 餐房DataGridView.CurrentRow.Cells0.Value.ToString();92 this.dieteticManagementDataSet.餐房.Rows.Find(no).Delete();93 94 9596 private void Modification_Click(object sender, EventArgs e)97 .98 string no = 餐房DataGridView.CurrentRow.Cells0.Value.ToString();99 using (frm餐房 f = new frm餐房(this.dieteticManagementDataSet.餐房.Rows.Find(no), Modification)100 .101 foreach (string s in RoomStatus)102 f.餐台状态ComboBox.Items.Add(s);103 string sdata = Program.DBOpertor.GetRoomClass();104 for (int i = 0; i sdata.Length; i+)105 f.房间类型ComboBox.Items.Add(sdatai);106 f.ShowDialog();107 108 109 110111 private void button1_Click(object sender, EventArgs e)112 .113 using (frm房间类型 f = new frm房间类型(this.dieteticManagementDataSet.房间类型,Add)114 .115 f.ShowDialog();116 117 118119 private void button2_Click(object sender, EventArgs e)120 .121 if (MessageBox.Show(确定要删除吗?, 删除确定, MessageBoxButtons.YesNo) = DialogResult.Yes)122 .123 string no = 房间类型DataGridView.CurrentRow.Cells0.Value.ToString();124 this.dieteticManagementDataSet.房间类型.Rows.Find(no).Delete();125 126 127128 private void button3_Click(object sender, EventArgs e)129 .130 string no = 房间类型DataGridView.CurrentRow.Cells0.Value.ToString();131 using (frm房间类型 f = new frm房间类型(this.dieteticManagementDataSet.房间类型.Rows.Find(no), Modification)132 .133 f.ShowDialog();134 135 136137 private void 商品类型添加_Click(object sender, EventArgs e)138 .139 using (frm商品类型 f = new frm商品类型(this.dieteticManagementDataSet.食品类别, Add)140 .141 f.ShowDialog();142 143 144145 private void 商品类型删除_Click(object sender, EventArgs e)146 .147 if (MessageBox.Show(确定要删除吗?, 删除确定, MessageBoxButtons.YesNo) = DialogResult.Yes)148 .149 string no = 商品类型DataGridView.CurrentRow.Cells0.Value.ToString();150 this.dieteticManagementDataSet.食品类别.Rows.Find(no).Delete();151 152 153154 private void 商品类型修改_Click(object sender, EventArgs e)155 .156 string no = 商品类型DataGridView.CurrentRow.Cells0.Value.ToString();157 using (frm商品类型 f = new frm商品类型(this.dieteticManagementDataSet.食品类别.Rows.Find(no), Modification)158 .159 f.ShowDialog();160 161 162163 private void 商品类型保存_Click(object sender, EventArgs e)164 .165 this.Validate();166 this.食品类别BindingSource.EndEdit();167 this.食品类别TableAdapter.Update(this.dieteticManagementDataSet.食品类别);168 169170 private void 餐牌添加_Click(object sender, EventArgs e)171 .172 using (frm餐牌 f = new frm餐牌(this.dieteticManagementDataSet.餐牌, Add)173 .174 DataTable BigClass = Program.DBOpertor.GetBigClass();175 string SBigClass;176 for (int i = 0; i BigClass.Rows.Count; i+)177 .178 SBigClass = BigClass.Rowsi食品类别.ToString();179 f.食品类别ComboBox.Items.Add(SBigClass);180 181 f.ShowDialog();182 183 184185 private void 餐牌删除_Click(object sender, EventArgs e)186 .187 if (MessageBox.Show(确定要删除吗?, 删除确定, MessageBoxButtons.YesNo) = DialogResult.Yes)188 .189 string no = 餐牌DataGridView.CurrentRow.Cells0.Value.ToString();190 this.dieteticManagementDataSet.餐牌.Rows.Find(no).Delete();191 192 193194 private void 餐牌修改_Click(object sender, EventArgs e)195 .196 string no = 餐牌DataGridView.CurrentRow.Cells0.Value.ToString();197 using (frm餐牌 f = new frm餐牌(this.dieteticManagementDataSet.餐牌.Rows.Find(no), Modification)198 .199 f.ShowDialog();200 201 202203 private void 餐牌保存_Click(object sender, EventArgs e)204 .205 this.Validate();206 this.餐牌BindingSource.EndEdit();207 this.餐牌TableAdapter.Update(this.dieteticManagementDataSet.餐牌);208 209210 private void 房间类型保存_Click(object sender, EventArgs e)211 .212 this.Validate();213 this.房间类型BindingSource.EndEdit();214 this.房间类型TableAdapter.Update(this.dieteticManagementDataSet.房间类型);215 216217 private void 餐房保存_Click(object sender, EventArgs e)218 .219 this.Validate();220 this.餐房BindingSource.EndEdit();221 this.餐房TableAdapter.Update(this.dieteticManagementDataSet.餐房);222 223224 private void Vip添加_Click(object sender, EventArgs e)225 .226 using (frmVip f = new frmVip(this.dieteticManagementDataSet.Vip, Add)227 .228 f.性别ComboBox.Items.Add(男);229 f.性别ComboBox.Items.Add(女);230 foreach (string s in VipClass)231 f.级别ComboBox.Items.Add(s);232 f.ShowDialog();233 234 235236 private void Vip修改_Click(object sender, EventArgs e)237 .238 string no = vipDataGridView.CurrentRow.Cells0.Value.ToString();239 using (frmVip f = new frmVip(this.dieteticManagementDataSet.Vip.Rows.Find(no), Modification)240 .241 f.性别ComboBox.Items.Add(男);242 f.性别ComboBox.Items.Add(女);243 foreach (string s in VipClass)244 f.级别ComboBox.Items.Add(s);245 f.ShowDialog();246 247 248249 private void Vip删除_Click(object sender, EventArgs e)250 .251 if (MessageBox.Show(确定要删除吗?, 删除确定, MessageBoxButtons.YesNo) = DialogResult.Yes)252 .253 string no = vipDataGridView.CurrentRow.Cells0.Value.ToString();254 this.dieteticManagementDataSet.Vip.Rows.Find(no).Delete();255 256 257258 private void Vip保存_Click(object sender, EventArgs e)259 .260 this.Validate();261 this.vipBindingSource.EndEdit();262 this.vipTableAdapter.Update(this.dieteticManagementDataSet.Vip);263 264265 private void Save_Click(object sender, EventArgs e)266 .267 餐牌保存_Click(sender, e);268 房间类型保存_Click(sender, e);269 商品类型保存_Click(sender, e);270 餐房保存_Click(sender, e);271 Vip保存_Click(sender, e);272 管理员保存_Click(sender, e);273 Program.f.GetUpToDate();274 this.Close();275 276277 private void Cancel_Click(object sender, EventArgs e)278 .279 this.Close();280 281282 private void 管理

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论