1、河南紫薇销售统计系统河南紫薇销售统计司统C#WindowsForm前台设计 设计背景:为方便鄢陵百泉花木公司销售管理方便,按需设计河南紫薇销售统计司统。 所用软件:Visual studio2010,sqlserver2008.司统应用平台:windowsXp、windows7、windows8司统。数据库信息由河南鄢陵百泉花木公司河南紫薇销售中心提供,具体详细信息参考自:网站。本系统的后台由中原公司进行分析设计,具体功能模块二由网络信息开发部们研究开发,具体实现由万次火柴网站负责技术人员负责设计实现。.cs文件代码:using System;using System.Collections.
2、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 six public partial class ziweis : Form public ziweis() InitializeComponent(); this.txtxh.Focus(); /打洙?开a窗洹?体?显?示?紫薇?信?息 priv
3、ate void ziweis_Load_1(object sender, EventArgs e) sixDB cdb = new sixDB(); this.getInfo(cdb.ziwei(); /查询显?示? private void getInfo(SqlDataReader _reader) try SqlDataReader reader = _reader; this.listView1.Items.Clear(); while (reader.Read() string subItems = new string reader.GetString(0), reader.Ge
4、tString(1).Trim(), reader.GetString(2), reader.GetString(3), reader.GetString(4), reader.GetString(5), reader.GetString(6) ; this.listView1.Items.Add(new ListViewItem(subItems); reader.Close(); catch (SqlException ex) MessageBox.Show(ex.ToString(), SQL错洙?误, MessageBoxButtons.OK, MessageBoxIcon.Infor
5、mation); catch (Exception ex) MessageBox.Show(ex.ToString(), 一?般?性?错洙?误, MessageBoxButtons.OK, MessageBoxIcon.Information); /按恪?紫号?、姓?名?、客悒?户?查询紫薇?信?息 private void chaxunxinxi_Click(object sender, EventArgs e) sixDB ser = new sixDB(); this.getInfo(ser.chaxun(this.txtxh.Text, this.txtxm.Text, this.tx
6、tbj.Text); this.txtxh .Text = ; this.txtbj.Text = ; this.txtxm .Text = ; this.txtxh.Focus(); /取?消?查询 private void quxiao_Click(object sender, EventArgs e) sixDB cdb = new sixDB(); this.getInfo(cdb.ziwei(); /查询所要癮删?除y的?紫薇?信?息 private void chaxun(SqlDataReader _reader) try SqlDataReader reader = _read
7、er; this.listView2.Items.Clear(); while (reader.Read() string subItems = new string reader.GetString(0), reader.GetString(1).Trim(), reader.GetString(2), reader.GetString(3), reader.GetString(4), reader.GetString(5), reader.GetString(6) ; this.listView2.Items.Add(new ListViewItem(subItems); reader.C
8、lose(); catch (SqlException ex) MessageBox.Show(ex.ToString(), SQL错洙?误, MessageBoxButtons.OK, MessageBoxIcon.Information); catch (Exception ex) MessageBox.Show(ex.ToString(), 一?般?性?错洙?误, MessageBoxButtons.OK, MessageBoxIcon.Information); private void xinxi_Click(object sender, EventArgs e) sixDB ser
9、 = new sixDB(); this.chaxun(ser.chaxun(this.shanxh.Text, this.shanxm.Text, this.shanbj.Text); this.shanxh.Text = ; this.shanxm.Text = ; this.shanbj.Text = ; /删除河南紫薇信息 private void shanchu_Click(object sender, EventArgs e) if (MessageBox.Show(您是?否?要癮删?除y选?中D的?信?息!?, 提 ?示?, MessageBoxButtons.OKCancel)
10、 = DialogResult.OK) sixDB del = new sixDB(); del.deletestu(this.shanxh.Text, this.shanxm.Text, this.shanbj.Text); this.getInfo(del.ziwei(); this.getInfo(del.ziwei(); this.listView2.Items.Clear(); private void timer1_Tick(object sender, EventArgs e) riqi.Text = 当獭?前日?期: + DateTime.Now.ToShortDateStri
11、ng(); shijian.Text = 当獭?前时骸?间?: + DateTime.Now.ToLongTimeString(); private void st_Click(object sender, EventArgs e) tongji tttt = new tongji(); tttt.Show(); this.Visible = false; private void button1_Click(object sender, EventArgs e) this.Close(); 鄢陵百泉花木公司紫薇销售统计软件前台设计由新乡画室艺林画室设计。Designer.cs文件代码:nam
12、espace six partial class ziweis / / Required designer variable. / private System.ComponentModel.IContainer components = null; / / Clean up any resources being used. / / true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) if (disposing & (co
13、mponents != null) components.Dispose(); base.Dispose(disposing); #region Windows Form Designer generated code / / Required method for Designer support - do not modify / the contents of this method with the code editor. / private void InitializeComponent() ponents = new System.ComponentModel.Containe
14、r(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ziweis); this.ziwei = new System.Windows.Forms.TabControl(); this.ckxsxx = new System.Windows.Forms.TabPage(); this.label6 = new System.Windows.Forms.Label(); this.listView1 = ne
15、w System.Windows.Forms.ListView(); this.columnHeader8 = (System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader(); this.columnHeader9 = (System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader(); this.columnHeader10 = (System.Windows.Forms.ColumnHeader)(new System.
16、Windows.Forms.ColumnHeader(); this.columnHeader11 = (System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader(); this.columnHeader12 = (System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader(); this.columnHeader13 = (System.Windows.Forms.ColumnHeader)(new System.Win
17、dows.Forms.ColumnHeader(); this.columnHeader14 = (System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader(); this.chaxunxinxi = new System.Windows.Forms.Button(); this.quxiao = new System.Windows.Forms.Button(); this.txtbj = new System.Windows.Forms.TextBox(); this.label1 = new Syst
18、em.Windows.Forms.Label(); this.chabanji = new System.Windows.Forms.Label(); this.txtxh = new System.Windows.Forms.TextBox(); this.txtxm = new System.Windows.Forms.TextBox(); this.chaxuehao = new System.Windows.Forms.Label(); this.chaxingming = new System.Windows.Forms.Label(); this.sxsxx = new Syste
19、m.Windows.Forms.TabPage(); this.label7 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.xinxi = new System.Windows.Forms.Button(); this.shanchu = new System.Windows.Forms.Button(); this.listView2 = new System.Windows.Forms.ListView(); this.columnHeader1 = (Sys
20、tem.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader(); this.columnHeader2 = (System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader(); this.columnHeader3 = (System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader(); this.columnHeader4 = (System.Wi
21、ndows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader(); this.columnHeader5 = (System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader(); this.columnHeader6 = (System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader(); this.columnHeader7 = (System.Windows.
22、Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader(); this.shanbj = new System.Windows.Forms.TextBox(); this.shanxm = new System.Windows.Forms.TextBox(); this.shanxh = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.La
23、bel(); this.label3 = new System.Windows.Forms.Label(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.st = new System.Windows.Forms.Button(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.riqi = new System.Windows.Forms.ToolStripStatusLabel(); this.shijian = new System
24、.Windows.Forms.ToolStripStatusLabel(); this.button1 = new System.Windows.Forms.Button(); this.timer1 = new System.Windows.Forms.Timer(ponents); this.ziwei.SuspendLayout(); this.ckxsxx.SuspendLayout(); this.sxsxx.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.SuspendLayout(); / / ziwei / th
25、is.ziwei.Controls.Add(this.ckxsxx); this.ziwei.Controls.Add(this.sxsxx); this.ziwei.Location = new System.Drawing.Point(0, -4); this.ziwei.Name = ziwei; this.ziwei.SelectedIndex = 0; this.ziwei.Size = new System.Drawing.Size(706, 576); this.ziwei.TabIndex = 0; / / ckxsxx / this.ckxsxx.BackColor = Sy
26、stem.Drawing.Color.Transparent; this.ckxsxx.BackgroundImage = (System.Drawing.Image)(resources.GetObject(ckxsxx.BackgroundImage); this.ckxsxx.Controls.Add(this.label6); this.ckxsxx.Controls.Add(this.listView1); this.ckxsxx.Controls.Add(this.chaxunxinxi); this.ckxsxx.Controls.Add(this.quxiao); this.c
27、kxsxx.Controls.Add(this.txtbj); this.ckxsxx.Controls.Add(this.label1); this.ckxsxx.Controls.Add(this.chabanji); this.ckxsxx.Controls.Add(this.txtxh); this.ckxsxx.Controls.Add(this.txtxm); this.ckxsxx.Controls.Add(this.chaxuehao); this.ckxsxx.Controls.Add(this.chaxingming); this.ckxsxx.Font = new Sys
28、tem.Drawing.Font(宋?体?, 36F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, (byte)(134); this.ckxsxx.ForeColor = System.Drawing.SystemColors.ControlText; this.ckxsxx.Location = new System.Drawing.Point(4, 22); this.ckxsxx.Name = ckxsxx; this.ckxsxx.Padding = new System.Windows.F
29、orms.Padding(3); this.ckxsxx.Size = new System.Drawing.Size(698, 553); this.ckxsxx.TabIndex = 1; this.ckxsxx.Text = 查看紫薇?信?息; / / label6 / this.label6.AutoSize = true; this.label6.Font = new System.Drawing.Font(宋?体?, 38.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (byte)(134); this.label6.Location = new System.Drawing.Point(146, 36); this.label6.Name = label6; this.label6.Size = new System.Drawing.Size(334, 51); this.label6.TabIndex = 13; this.label6.Text = 查看紫薇?信?息; / / listView1 / this.list