Word格式
{
MessageBox.Show(\添加成功O(∩_∩)O~\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Information); } else {
MessageBox.Show(\对不起,失败了::>_<:: \, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Information); }
conn.Close(); }
private void Form5_Load(object sender, EventArgs e) {
} } }
商品退货信息模块
商品退货信息模块是针对顾客销售退回业务的信息进行查询。 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; using System.Data.SqlClient;
namespace csharp {
public partial class Form6 : Form {
public Form6() {
InitializeComponent(); }
private void button2_Click(object sender, EventArgs e) {
Form2 f2 = new Form2(); f2.Show();
完美整理
Word格式
this.Close(); }
private void button1_Click(object sender, EventArgs e) {
SqlConnection conn = new
SqlConnection(\); string strsql = \ + textBox1.Text + \; SqlCommand comm = new SqlCommand(strsql, conn); if (conn.State == ConnectionState.Closed) {
conn.Open(); }
if (Convert.ToInt32(comm.ExecuteNonQuery()) > 0) {
MessageBox.Show(\退货成功,信息已删除,请返回O(∩_∩)O~\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Information); } else {
MessageBox.Show(\对不起,删除失败了::>_<::请检测用户名 \, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Information); }
conn.Close(); }
private void button3_Click(object sender, EventArgs e) {
SqlConnection con = new
SqlConnection(\); con.Open();
SqlDataAdapter da = new SqlDataAdapter(\ + textBox1.Text.Trim() + \, con); DataSet ds = new DataSet(); da.Fill(ds);
if (ds.Tables[0].Rows.Count == 0) {
MessageBox.Show(\单号不存在.请重新输入\, \系统提示\, MessageBoxButtons.OK, MessageBoxIcon.Error); return; } else {
MessageBox.Show(\可以退货,请继续!\, \系统提示\, MessageBoxButtons.OK, MessageBoxIcon.Information);
完美整理
Word格式
}}
private void Form6_Load(object sender, EventArgs e) {
} } }
供应商信息模块
供应商信息模块是对商品供应商信息的录入,以便查询。 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; using System.Data.SqlClient;
namespace csharp {
public partial class Form8 : Form {
public Form8() {
InitializeComponent(); }
private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e) {
}
private void Form8_Load(object sender, EventArgs e) {
}
private void button2_Click(object sender, EventArgs e) {
完美整理
Word格式
Form2 f2 = new Form2(); f2.Show(); this.Close(); }
private void button1_Click(object sender, EventArgs e) {
SqlConnection conn = new
SqlConnection(\); string strsql = \ + textBox1.Text + \ + textBox2.Text + \;
SqlCommand comm = new SqlCommand(strsql, conn); if (conn.State == ConnectionState.Closed) {
conn.Open(); }
if (Convert.ToInt32(comm.ExecuteNonQuery()) > 0) {
MessageBox.Show(\添加成功O(∩_∩)O~\, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Information); } else {
MessageBox.Show(\对不起,失败了::>_<:: \, \提示\, MessageBoxButtons.OK, MessageBoxIcon.Information); }
conn.Close(); } } }
退出系统提醒模块
当用户退出时,会提醒用户是否决定退出系统。 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 csharp {
完美整理
相关推荐: