ImageVerifierCode 换一换
格式:DOC , 页数:10 ,大小:37KB ,
资源ID:1102942      下载积分:1 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bingdoc.com/d-1102942.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(超市管理系统代码.doc)为本站会员(wj)主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(发送邮件至service@bingdoc.com或直接QQ联系客服),我们立即给予删除!

超市管理系统代码.doc

1、using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace 超市管理信息系统 public partial class f_供应商基本信息 : Form /公有变量记录选定数据 public string strOldNO = ; public string strOldName = ; public string str

2、OldAdd = ; public f_供应商基本信息() InitializeComponent(); private void f_供应商基本信息_Load(object sender, EventArgs e) / TODO: 这行代码将数据加载到表“连锁超市管理信息数据库DataSet.供应商”中。您可以根据需要移动或移除它。 this.供应商TableAdapter.Fill(this.连锁超市管理信息数据库DataSet.供应商); /新增数据单击事件 private void btnInsert_Click(object sender, EventArgs e) /获取前台数据

3、string strName = txtName.Text; string strAdd = txtAdd.Text; string strNO = txtNO.Text; int iNO = 0; int iErrCode = 0; /对前台编号数据的格式审核 try iNO = Convert.ToInt32(txtNO.Text.Trim(); catch (Exception eINO) iErrCode = 1; /对前台名称数据的格式审核 if (strName.Length 20) iErrCode = 2; if (strAdd.Length 30) iErrCode = 3;

4、 if (iErrCode != 0) MessageBox.Show(你所输入的数据有误,请核查!); else try /新增写入数据库 this.供应商TableAdapter.Insert(iNO, strName, strAdd); catch (Exception exInsert) MessageBox.Show(新增数据发生错误,请与管理员联系!); /刷新数据列数 this.供应商TableAdapter.Fill(this.连锁超市管理信息数据库DataSet.供应商); /单击数据表单元格触发事件 private void dataGridView1_CellClick(

5、object sender, DataGridViewCellEventArgs e) /获取对应行的各个单元格数据 string strNO = this.dataGridView1.Rowse.RowIndex.Cells0.Value.ToString(); string strName = this.dataGridView1.Rowse.RowIndex.Cells1.Value.ToString(); string strAdd = this.dataGridView1.Rowse.RowIndex.Cells2.Value.ToString(); /填充回对应的文本框 txtNO

6、.Text = strNO; txtName.Text = strName; txtAdd.Text = strAdd; /将原数据值赋予公有变量 strOldNO = strNO; strOldName = strName; strOldAdd = strAdd; /删除按钮事件 private void btnDelete_Click(object sender, EventArgs e) /获取前台数据 string strName = txtName.Text; string strAdd = txtAdd.Text; string strNO = txtNO.Text; int iN

7、O = 0; int iErrCode = 0; /对前台编号数据的格式审核 try iNO = Convert.ToInt32(txtNO.Text.Trim(); catch (Exception eINO) iErrCode = 1; /对前台名称数据的格式审核 if (strName.Length 20) iErrCode = 2; if (strAdd.Length 30) iErrCode = 3; if (iErrCode != 0) MessageBox.Show(你所输入的数据有误,请核查!); else try /新增写入数据库 this.供应商TableAdapter.D

8、elete(iNO, strName, strAdd); catch (Exception exInsert) MessageBox.Show(删除数据发生错误,请与管理员联系!); /刷新数据列数 this.供应商TableAdapter.Fill(this.连锁超市管理信息数据库DataSet.供应商); /修改按钮事件 private void btnUpdate_Click(object sender, EventArgs e) /获取前台数据 string strName = txtName.Text; string strAdd = txtAdd.Text; string strN

9、O = txtNO.Text; int iNO = 0; int iErrCode = 0; /对前台编号数据的格式审核 try iNO = Convert.ToInt32(txtNO.Text.Trim(); catch (Exception eINO) iErrCode = 1; /对前台名称数据的格式审核 if (strName.Length 20) iErrCode = 2; if (strAdd.Length 30) iErrCode = 3; if (iErrCode != 0) MessageBox.Show(你所输入的数据有误,请核查!); else try this.供应商T

10、ableAdapter.Update(iNO, strName, strAdd, Convert.ToInt32(strOldNO), strOldName, strOldAdd); catch (Exception exUpdate) MessageBox.Show(修改数据发生错误,请与管理员联系!); /刷新数据列数 this.供应商TableAdapter.Fill(this.连锁超市管理信息数据库DataSet.供应商); using System;using System.Collections.Generic;using System.ComponentModel;using S

11、ystem.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace 超市管理信息系统 public partial class f_供应商基本信息 : Form /公有变量记录选定数据 public string strOldNO = ; public string strOldName = ; public string strOldAdd = ; public f_供应商基本信息() InitializeComponent(); private void f_供应商基本信息_Load(

12、object sender, EventArgs e) / TODO: 这行代码将数据加载到表“连锁超市管理信息数据库DataSet.供应商”中。您可以根据需要移动或移除它。 this.供应商TableAdapter.Fill(this.连锁超市管理信息数据库DataSet.供应商); /新增数据单击事件 private void btnInsert_Click(object sender, EventArgs e) /获取前台数据 string strName = txtName.Text; string strAdd = txtAdd.Text; string strNO = txtNO.

13、Text; int iNO = 0; int iErrCode = 0; /对前台编号数据的格式审核 try iNO = Convert.ToInt32(txtNO.Text.Trim(); catch (Exception eINO) iErrCode = 1; /对前台名称数据的格式审核 if (strName.Length 20) iErrCode = 2; if (strAdd.Length 30) iErrCode = 3; if (iErrCode != 0) MessageBox.Show(你所输入的数据有误,请核查!); else try /新增写入数据库 this.供应商Ta

14、bleAdapter.Insert(iNO, strName, strAdd); catch (Exception exInsert) MessageBox.Show(新增数据发生错误,请与管理员联系!); /刷新数据列数 this.供应商TableAdapter.Fill(this.连锁超市管理信息数据库DataSet.供应商); /单击数据表单元格触发事件 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) /获取对应行的各个单元格数据 string strNO = this.da

15、taGridView1.Rowse.RowIndex.Cells0.Value.ToString(); string strName = this.dataGridView1.Rowse.RowIndex.Cells1.Value.ToString(); string strAdd = this.dataGridView1.Rowse.RowIndex.Cells2.Value.ToString(); /填充回对应的文本框 txtNO.Text = strNO; txtName.Text = strName; txtAdd.Text = strAdd; /将原数据值赋予公有变量 strOldN

16、O = strNO; strOldName = strName; strOldAdd = strAdd; /删除按钮事件 private void btnDelete_Click(object sender, EventArgs e) /获取前台数据 string strName = txtName.Text; string strAdd = txtAdd.Text; string strNO = txtNO.Text; int iNO = 0; int iErrCode = 0; /对前台编号数据的格式审核 try iNO = Convert.ToInt32(txtNO.Text.Trim(

17、); catch (Exception eINO) iErrCode = 1; /对前台名称数据的格式审核 if (strName.Length 20) iErrCode = 2; if (strAdd.Length 30) iErrCode = 3; if (iErrCode != 0) MessageBox.Show(你所输入的数据有误,请核查!); else try /新增写入数据库 this.供应商TableAdapter.Delete(iNO, strName, strAdd); catch (Exception exInsert) MessageBox.Show(删除数据发生错误,

18、请与管理员联系!); /刷新数据列数 this.供应商TableAdapter.Fill(this.连锁超市管理信息数据库DataSet.供应商); /修改按钮事件 private void btnUpdate_Click(object sender, EventArgs e) /获取前台数据 string strName = txtName.Text; string strAdd = txtAdd.Text; string strNO = txtNO.Text; int iNO = 0; int iErrCode = 0; /对前台编号数据的格式审核 try iNO = Convert.ToInt32(txtNO.Text.Trim(); catch (Exception eINO)

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2