📄 添加销售商品.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.IO;
using System.Windows.Forms;
using Yewucheng;
namespace Myproject
{
public partial class 添加销售商品 : Form
{
wang merThod = new wang();
public 添加销售商品()
{
InitializeComponent();
}
private void button3_Click(object sender, EventArgs e)
{
this.Close();
}
private void 添加销售商品_Load(object sender, EventArgs e)
{
DataSet ds = merThod.SelectMand("select *from SouXuanshanp");
this.dataGridView1.DataSource = ds.Tables[0].DefaultView;
}
private void button2_Click(object sender, EventArgs e)
{
try
{
DataSet ds = merThod.SelectMand("select *from SouXuanshanp where 商品编号='" + this.txt1.Text + "'");
this.dataGridView2.DataSource = ds.Tables[0].DefaultView;
}
catch(Exception)
{
MessageBox.Show("你输入的商品编号为空或输入错误","系统消息");
}
}
private void button4_Click(object sender, EventArgs e)
{
修改商品 xiugai = new 修改商品(this);
xiugai.Show();
}
private void button1_Click(object sender, EventArgs e)
{
merThod.DeleteMand("delete SouXuanshanp where 商品编号='" + this.txt1.Text + "'");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -