云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 数据库课设 超市管理系统

数据库课设 超市管理系统

  • 62 次阅读
  • 3 次下载
  • 2025/5/4 0:21:40

5.5 商品信息模块

界面如图5-4所示。

图5-5 商品信息界面

主要实现代码如下:

using System;

using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text;

using System.Windows.Forms;

namespace 超市系统 {

public partial class 商品 : Form

{

public 商品() {

InitializeComponent(); }

private void Bind(string sql) {

MyDataSource data = new MyDataSource(); DataSet ds = data.get_dataset(sql); dataGridView1.DataSource = ds.Tables[0]; }

private void 商品_Load(object sender, EventArgs e)

{

string sql = \; Bind(sql); }

private void button2_Click(object sender, EventArgs e) {

Form1 a = new Form1(); this.Hide();

a.ShowDialog(); }

private void button1_Click_1(object sender, EventArgs e) {

string deletedid =

dataGridView1.CurrentRow.Cells[\商品名称\].Value.ToString();

string sql = \商品名称='\ + deletedid + \;

MyDataSource data = new MyDataSource(); data.update(sql);

Bind(\); }

private void button3_Click(object sender, EventArgs e) {

string deletedid =

dataGridView1.CurrentRow.Cells[\商品名称\].Value.ToString();

string sql = \商品名称='\ + textBox1.Text + \单价='\ + textBox2.Text + \进货数量='\ + textBox3.Text + \供应商='\ + textBox4.Text + \商品类型='\ + textBox5.Text + \摆放位置='\ + textBox6.Text + \商品名称='\ + deletedid + \;

MyDataSource data = new MyDataSource(); data.update(sql);

Bind(\); }

private void button4_Click(object sender, EventArgs e) {

string sql = \into shangpin(商品名称,单价,进货数量,供应商,商品类型,摆放位

置)values('\+textBox1.Text+\+textBox2.Text+\+textBox3.Text+\+textBox4.Text+\+textBox5.Text+\+textBox6.Text+\;

MyDataSource data = new MyDataSource(); data.update(sql);

Bind(\); }

搜索更多关于: 数据库课设 超市管理系统 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

5.5 商品信息模块 界面如图5-4所示。 图5-5 商品信息界面 主要实现代码如下: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace 超市系统 { public partial class 商品 : Form { public 商品() { <

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com