⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sellform.cs

📁 超市管理系统的完整版文档
💻 CS
📖 第 1 页 / 共 3 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using SupDataBase;
using System.Data.SqlClient;
using System.Globalization;

namespace WindowsApplication1
{
	/// <summary>
	/// Form1 的摘要说明。
	/// </summary>
	public class SellForm : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.Label label7;
		private System.Windows.Forms.Label label8;
		private System.Windows.Forms.Label label9;
		private System.Windows.Forms.Label label10;
		private System.Windows.Forms.TextBox m_txtgoodscode;
		private bool nonNumberEntered;
    	private bool enterKeyEntered;
		private System.Windows.Forms.TextBox m_txtGoodsInfoRemark;
		private System.Windows.Forms.TextBox m_txtGoodsInfoStock;
		private System.Windows.Forms.TextBox m_txtGoodsInfoNumber;
		private System.Windows.Forms.TextBox m_txtGoodsInfoPrice;
		private System.Windows.Forms.TextBox m_txtGoodsInfoName;
		private System.Windows.Forms.TextBox m_txtGoodsInfoCode;
		private System.Windows.Forms.Label m_labelGoodsUnit;
		private System.Windows.Forms.ListView m_goodsList;
		private System.Windows.Forms.ColumnHeader columnHeader1;
		private System.Windows.Forms.ColumnHeader columnHeader2;
		private System.Windows.Forms.ColumnHeader columnHeader3;
		private System.Windows.Forms.ColumnHeader columnHeader4;
		private System.Windows.Forms.ColumnHeader columnHeader5;
		private System.Windows.Forms.ColumnHeader columnHeader6;
		private System.Windows.Forms.ColumnHeader columnHeader7;
		private System.Windows.Forms.ColumnHeader columnHeader8;
		private int nextGoodsID;
		private System.Windows.Forms.ColumnHeader columnHeader9;
		private int pre_sel;
		private System.Windows.Forms.TextBox m_txtTotalMoney;
		private System.Windows.Forms.Button m_bntCancelGoods;
		private System.Windows.Forms.Button m_bntSell;
		private System.Windows.Forms.CheckBox m_chkIsDebt;
		private System.Windows.Forms.TextBox m_txtDebtMoney;
		private System.Windows.Forms.Button m_bntClearAll;
		private System.Windows.Forms.ColumnHeader columnHeader10;
		private System.Windows.Forms.ColumnHeader columnHeader11;
		private int employeeId;
		private System.Windows.Forms.TextBox m_txtCustomName;
		private System.Windows.Forms.Button m_bntBrowse;

		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public SellForm()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();
		
			nextGoodsID = 1;
			pre_sel = -1;
			employeeId = 1;//for temp
			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			this.m_bntSell = new System.Windows.Forms.Button();
			this.m_txtgoodscode = new System.Windows.Forms.TextBox();
			this.label1 = new System.Windows.Forms.Label();
			this.m_bntCancelGoods = new System.Windows.Forms.Button();
			this.m_txtTotalMoney = new System.Windows.Forms.TextBox();
			this.label2 = new System.Windows.Forms.Label();
			this.m_chkIsDebt = new System.Windows.Forms.CheckBox();
			this.label3 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.m_txtDebtMoney = new System.Windows.Forms.TextBox();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.m_labelGoodsUnit = new System.Windows.Forms.Label();
			this.m_txtGoodsInfoRemark = new System.Windows.Forms.TextBox();
			this.m_txtGoodsInfoStock = new System.Windows.Forms.TextBox();
			this.m_txtGoodsInfoNumber = new System.Windows.Forms.TextBox();
			this.m_txtGoodsInfoPrice = new System.Windows.Forms.TextBox();
			this.m_txtGoodsInfoName = new System.Windows.Forms.TextBox();
			this.m_txtGoodsInfoCode = new System.Windows.Forms.TextBox();
			this.label10 = new System.Windows.Forms.Label();
			this.label9 = new System.Windows.Forms.Label();
			this.label8 = new System.Windows.Forms.Label();
			this.label7 = new System.Windows.Forms.Label();
			this.label6 = new System.Windows.Forms.Label();
			this.label5 = new System.Windows.Forms.Label();
			this.m_goodsList = new System.Windows.Forms.ListView();
			this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader4 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader5 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader6 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader7 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader8 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader9 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader10 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader11 = new System.Windows.Forms.ColumnHeader();
			this.m_bntClearAll = new System.Windows.Forms.Button();
			this.m_txtCustomName = new System.Windows.Forms.TextBox();
			this.m_bntBrowse = new System.Windows.Forms.Button();
			this.groupBox1.SuspendLayout();
			this.SuspendLayout();
			// 
			// m_bntSell
			// 
			this.m_bntSell.Location = new System.Drawing.Point(224, 24);
			this.m_bntSell.Name = "m_bntSell";
			this.m_bntSell.Size = new System.Drawing.Size(48, 23);
			this.m_bntSell.TabIndex = 0;
			this.m_bntSell.Text = "出售";
			this.m_bntSell.Click += new System.EventHandler(this.m_bntSell_Click);
			// 
			// m_txtgoodscode
			// 
			this.m_txtgoodscode.Location = new System.Drawing.Point(80, 24);
			this.m_txtgoodscode.Name = "m_txtgoodscode";
			this.m_txtgoodscode.Size = new System.Drawing.Size(112, 21);
			this.m_txtgoodscode.TabIndex = 1;
			this.m_txtgoodscode.Text = "";
			this.m_txtgoodscode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.m_txtgoodscode_KeyDown);
			this.m_txtgoodscode.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.m_txtgoodscode_KeyPress);
			this.m_txtgoodscode.TextChanged += new System.EventHandler(this.m_txtgoodscode_TextChanged);
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(24, 32);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(48, 16);
			this.label1.TabIndex = 2;
			this.label1.Text = "条形码";
			this.label1.Click += new System.EventHandler(this.label1_Click);
			// 
			// m_bntCancelGoods
			// 
			this.m_bntCancelGoods.Location = new System.Drawing.Point(304, 24);
			this.m_bntCancelGoods.Name = "m_bntCancelGoods";
			this.m_bntCancelGoods.Size = new System.Drawing.Size(48, 23);
			this.m_bntCancelGoods.TabIndex = 3;
			this.m_bntCancelGoods.Text = "删除";
			this.m_bntCancelGoods.Click += new System.EventHandler(this.m_bntCancelGoods_Click);
			// 
			// m_txtTotalMoney
			// 
			this.m_txtTotalMoney.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.m_txtTotalMoney.ForeColor = System.Drawing.Color.Purple;
			this.m_txtTotalMoney.Location = new System.Drawing.Point(80, 64);
			this.m_txtTotalMoney.Name = "m_txtTotalMoney";
			this.m_txtTotalMoney.Size = new System.Drawing.Size(64, 21);
			this.m_txtTotalMoney.TabIndex = 5;
			this.m_txtTotalMoney.Text = "0.00";
			this.m_txtTotalMoney.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
			this.m_txtTotalMoney.TextChanged += new System.EventHandler(this.textBox2_TextChanged);
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(24, 64);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(48, 16);
			this.label2.TabIndex = 6;
			this.label2.Text = "应收款";
			this.label2.Click += new System.EventHandler(this.label2_Click);
			// 
			// m_chkIsDebt
			// 
			this.m_chkIsDebt.Location = new System.Drawing.Point(216, 64);
			this.m_chkIsDebt.Name = "m_chkIsDebt";
			this.m_chkIsDebt.Size = new System.Drawing.Size(48, 24);
			this.m_chkIsDebt.TabIndex = 7;
			this.m_chkIsDebt.Text = "赊帐";
			this.m_chkIsDebt.CheckedChanged += new System.EventHandler(this.m_chkIsDebt_CheckedChanged);
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(288, 72);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(48, 16);
			this.label3.TabIndex = 9;
			this.label3.Text = "客户名";
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(504, 72);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(32, 16);
			this.label4.TabIndex = 10;
			this.label4.Text = "缺额";
			this.label4.Click += new System.EventHandler(this.label4_Click);
			// 
			// m_txtDebtMoney
			// 
			this.m_txtDebtMoney.Enabled = false;
			this.m_txtDebtMoney.Location = new System.Drawing.Point(560, 64);
			this.m_txtDebtMoney.Name = "m_txtDebtMoney";
			this.m_txtDebtMoney.Size = new System.Drawing.Size(64, 21);
			this.m_txtDebtMoney.TabIndex = 11;
			this.m_txtDebtMoney.Text = "0.00";
			this.m_txtDebtMoney.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.m_labelGoodsUnit);
			this.groupBox1.Controls.Add(this.m_txtGoodsInfoRemark);
			this.groupBox1.Controls.Add(this.m_txtGoodsInfoStock);
			this.groupBox1.Controls.Add(this.m_txtGoodsInfoNumber);
			this.groupBox1.Controls.Add(this.m_txtGoodsInfoPrice);
			this.groupBox1.Controls.Add(this.m_txtGoodsInfoName);
			this.groupBox1.Controls.Add(this.m_txtGoodsInfoCode);
			this.groupBox1.Controls.Add(this.label10);
			this.groupBox1.Controls.Add(this.label9);
			this.groupBox1.Controls.Add(this.label8);
			this.groupBox1.Controls.Add(this.label7);
			this.groupBox1.Controls.Add(this.label6);
			this.groupBox1.Controls.Add(this.label5);
			this.groupBox1.Location = new System.Drawing.Point(24, 344);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(824, 168);
			this.groupBox1.TabIndex = 12;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "商品信息";
			// 
			// m_labelGoodsUnit
			// 
			this.m_labelGoodsUnit.Location = new System.Drawing.Point(312, 80);
			this.m_labelGoodsUnit.Name = "m_labelGoodsUnit";
			this.m_labelGoodsUnit.Size = new System.Drawing.Size(40, 16);
			this.m_labelGoodsUnit.TabIndex = 12;
			this.m_labelGoodsUnit.Text = "个";
			// 
			// m_txtGoodsInfoRemark
			// 
			this.m_txtGoodsInfoRemark.Location = new System.Drawing.Point(96, 112);
			this.m_txtGoodsInfoRemark.Name = "m_txtGoodsInfoRemark";
			this.m_txtGoodsInfoRemark.Size = new System.Drawing.Size(352, 21);
			this.m_txtGoodsInfoRemark.TabIndex = 11;
			this.m_txtGoodsInfoRemark.Text = "";
			// 
			// m_txtGoodsInfoStock
			// 
			this.m_txtGoodsInfoStock.Location = new System.Drawing.Point(400, 72);
			this.m_txtGoodsInfoStock.Name = "m_txtGoodsInfoStock";
			this.m_txtGoodsInfoStock.Size = new System.Drawing.Size(48, 21);
			this.m_txtGoodsInfoStock.TabIndex = 10;
			this.m_txtGoodsInfoStock.Text = "";
			// 
			// m_txtGoodsInfoNumber
			// 
			this.m_txtGoodsInfoNumber.Location = new System.Drawing.Point(264, 72);
			this.m_txtGoodsInfoNumber.Name = "m_txtGoodsInfoNumber";
			this.m_txtGoodsInfoNumber.Size = new System.Drawing.Size(32, 21);
			this.m_txtGoodsInfoNumber.TabIndex = 9;
			this.m_txtGoodsInfoNumber.Text = "";
			this.m_txtGoodsInfoNumber.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.m_txtGoodsInfoNumber_KeyPress);
			// 
			// m_txtGoodsInfoPrice
			// 
			this.m_txtGoodsInfoPrice.Location = new System.Drawing.Point(96, 72);
			this.m_txtGoodsInfoPrice.Name = "m_txtGoodsInfoPrice";
			this.m_txtGoodsInfoPrice.TabIndex = 8;
			this.m_txtGoodsInfoPrice.Text = "";
			// 
			// m_txtGoodsInfoName
			// 
			this.m_txtGoodsInfoName.Location = new System.Drawing.Point(264, 32);
			this.m_txtGoodsInfoName.Name = "m_txtGoodsInfoName";
			this.m_txtGoodsInfoName.Size = new System.Drawing.Size(184, 21);
			this.m_txtGoodsInfoName.TabIndex = 7;
			this.m_txtGoodsInfoName.Text = "";

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -