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

📄 frmaddstock.cs

📁 本论文叙述了联机考试系统的现状以及C#语言的概况。重点介绍了联机考试系统的实现过程:包括系统分析、 系统调查、 数据流程分析、功能设计、 数据库设计、 系统物理配置方案、 系统实现、 系统测试和调试。
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OleDb; 

namespace SupermarketProject
{
	/// <summary>
	/// Summary description for frmStock.
	/// </summary>
	public class frmAddStock : System.Windows.Forms.Form
	{
		public string catCode,prodId;
		private System.Windows.Forms.ListView lvwProd;
		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.Panel panel1;
		private System.Windows.Forms.TextBox txtProdName;
		private System.Windows.Forms.TextBox txtProdDesc;
		private System.Windows.Forms.TextBox txtProdCat;
		private System.Windows.Forms.TextBox txtQty;
		private System.Windows.Forms.Label lblStkNo;
		private System.Windows.Forms.Label lblStockQty;
		private System.Windows.Forms.TextBox txtStockQty;
		private System.Windows.Forms.TextBox txtPurPrice;
		private System.Windows.Forms.TreeView tvwCatCode;
		private System.Windows.Forms.Button btnOK;
		private System.Windows.Forms.Button btnCancel;
		private System.Windows.Forms.DateTimePicker dtpStkDate;
		private System.Windows.Forms.TextBox txtStockId;
		private bool allValidated =  false;
		private System.Windows.Forms.Label lblProdCatTitle;
		private System.Windows.Forms.Label lblProdTitle;
		private System.Windows.Forms.ErrorProvider errStock;
		private System.Windows.Forms.HelpProvider hlpStock;
		private System.Windows.Forms.ToolTip tipStock;
		private System.ComponentModel.IContainer components;
		private System.Windows.Forms.Label lblPurPrice;
		private System.Windows.Forms.Label lblStkDate;
        private Settings settings;

		public frmAddStock()
		{

			InitializeComponent();
			settings = new Settings();
			this.hlpStock.HelpNamespace=settings.uiDirectory+ @"\HELP\SupermarketHelp.chm";  
		}


		/// <summary>

		/// Clean up any resources being used.

		/// </summary>

		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}


		#region Windows Form Designer generated code

		/// <summary>

		/// Required method for Designer support - do not modify

		/// the contents of this method with the code editor.

		/// </summary>

		private void InitializeComponent()

		{
			this.components = new System.ComponentModel.Container();
			this.tvwCatCode = new System.Windows.Forms.TreeView();
			this.lvwProd = new System.Windows.Forms.ListView();
			this.label1 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.txtProdName = new System.Windows.Forms.TextBox();
			this.txtProdDesc = new System.Windows.Forms.TextBox();
			this.txtProdCat = new System.Windows.Forms.TextBox();
			this.txtQty = new System.Windows.Forms.TextBox();
			this.panel1 = new System.Windows.Forms.Panel();
			this.lblPurPrice = new System.Windows.Forms.Label();
			this.lblStkDate = new System.Windows.Forms.Label();
			this.lblStkNo = new System.Windows.Forms.Label();
			this.lblStockQty = new System.Windows.Forms.Label();
			this.txtStockQty = new System.Windows.Forms.TextBox();
			this.txtPurPrice = new System.Windows.Forms.TextBox();
			this.txtStockId = new System.Windows.Forms.TextBox();
			this.btnOK = new System.Windows.Forms.Button();
			this.btnCancel = new System.Windows.Forms.Button();
			this.dtpStkDate = new System.Windows.Forms.DateTimePicker();
			this.errStock = new System.Windows.Forms.ErrorProvider();
			this.lblProdCatTitle = new System.Windows.Forms.Label();
			this.lblProdTitle = new System.Windows.Forms.Label();
			this.hlpStock = new System.Windows.Forms.HelpProvider();
			this.tipStock = new System.Windows.Forms.ToolTip(this.components);
			this.panel1.SuspendLayout();
			this.SuspendLayout();
			// 
			// tvwCatCode
			// 
			this.tvwCatCode.ImageIndex = -1;
			this.tvwCatCode.Location = new System.Drawing.Point(19, 52);
			this.tvwCatCode.Name = "tvwCatCode";
			this.tvwCatCode.SelectedImageIndex = -1;
			this.tvwCatCode.Size = new System.Drawing.Size(327, 172);
			this.tvwCatCode.TabIndex = 2;
			this.tvwCatCode.MouseHover += new System.EventHandler(this.tvwCatCode_MouseHover);
			this.tvwCatCode.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvwCatCode_AfterSelect);
			// 
			// lvwProd
			// 
			this.lvwProd.Location = new System.Drawing.Point(355, 52);
			this.lvwProd.Name = "lvwProd";
			this.lvwProd.Size = new System.Drawing.Size(317, 172);
			this.lvwProd.TabIndex = 3;
			this.lvwProd.View = System.Windows.Forms.View.List;
			this.lvwProd.Click += new System.EventHandler(this.lvwProd_Click);
			this.lvwProd.MouseHover += new System.EventHandler(this.lvwProd_MouseHover);
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(0, 17);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(120, 25);
			this.label1.TabIndex = 0;
			this.label1.Text = "产品名称";
			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(10, 60);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(120, 25);
			this.label2.TabIndex = 2;
			this.label2.Text = "说明";
			this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(307, 17);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(120, 25);
			this.label3.TabIndex = 4;
			this.label3.Text = "产品类别";
			this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(317, 60);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(120, 25);
			this.label4.TabIndex = 5;
			this.label4.Text = "数量";
			this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// txtProdName
			// 
			this.txtProdName.Location = new System.Drawing.Point(134, 17);
			this.txtProdName.Name = "txtProdName";
			this.txtProdName.ReadOnly = true;
			this.txtProdName.Size = new System.Drawing.Size(120, 21);
			this.txtProdName.TabIndex = 1;
			this.txtProdName.Text = "";
			// 
			// txtProdDesc
			// 
			this.txtProdDesc.Location = new System.Drawing.Point(134, 60);
			this.txtProdDesc.Name = "txtProdDesc";
			this.txtProdDesc.ReadOnly = true;
			this.txtProdDesc.Size = new System.Drawing.Size(120, 21);
			this.txtProdDesc.TabIndex = 3;
			this.txtProdDesc.Text = "";
			// 
			// txtProdCat
			// 
			this.txtProdCat.Location = new System.Drawing.Point(432, 17);
			this.txtProdCat.Name = "txtProdCat";
			this.txtProdCat.ReadOnly = true;
			this.txtProdCat.Size = new System.Drawing.Size(120, 21);
			this.txtProdCat.TabIndex = 5;
			this.txtProdCat.Text = "";
			// 
			// txtQty
			// 
			this.txtQty.Location = new System.Drawing.Point(432, 52);
			this.txtQty.Name = "txtQty";
			this.txtQty.ReadOnly = true;
			this.txtQty.Size = new System.Drawing.Size(120, 21);
			this.txtQty.TabIndex = 6;
			this.txtQty.Text = "";
			// 
			// panel1
			// 
			this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.panel1.Controls.Add(this.txtProdCat);
			this.panel1.Controls.Add(this.label3);
			this.panel1.Controls.Add(this.txtQty);
			this.panel1.Controls.Add(this.label4);
			this.panel1.Controls.Add(this.txtProdName);
			this.panel1.Controls.Add(this.txtProdDesc);
			this.panel1.Controls.Add(this.label1);
			this.panel1.Controls.Add(this.label2);
			this.panel1.Location = new System.Drawing.Point(19, 241);
			this.panel1.Name = "panel1";
			this.panel1.Size = new System.Drawing.Size(653, 104);
			this.panel1.TabIndex = 4;
			// 
			// lblPurPrice
			// 
			this.lblPurPrice.Location = new System.Drawing.Point(29, 362);
			this.lblPurPrice.Name = "lblPurPrice";
			this.lblPurPrice.Size = new System.Drawing.Size(120, 25);
			this.lblPurPrice.TabIndex = 5;
			this.lblPurPrice.Text = "购入价格";
			this.lblPurPrice.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// lblStkDate
			// 
			this.lblStkDate.Location = new System.Drawing.Point(29, 396);
			this.lblStkDate.Name = "lblStkDate";
			this.lblStkDate.Size = new System.Drawing.Size(96, 25);
			this.lblStkDate.TabIndex = 9;
			this.lblStkDate.Text = "库存日期";
			this.lblStkDate.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// lblStkNo
			// 
			this.lblStkNo.Location = new System.Drawing.Point(394, 362);
			this.lblStkNo.Name = "lblStkNo";
			this.lblStkNo.Size = new System.Drawing.Size(67, 25);
			this.lblStkNo.TabIndex = 7;
			this.lblStkNo.Text = "库存标识";
			this.lblStkNo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// lblStockQty
			// 
			this.lblStockQty.Location = new System.Drawing.Point(394, 396);
			this.lblStockQty.Name = "lblStockQty";
			this.lblStockQty.Size = new System.Drawing.Size(57, 25);
			this.lblStockQty.TabIndex = 11;
			this.lblStockQty.Text = "数量";
			this.lblStockQty.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// txtStockQty
			// 
			this.txtStockQty.Location = new System.Drawing.Point(470, 396);
			this.txtStockQty.Name = "txtStockQty";
			this.txtStockQty.Size = new System.Drawing.Size(120, 21);
			this.txtStockQty.TabIndex = 12;
			this.txtStockQty.Text = "";
			this.txtStockQty.MouseHover += new System.EventHandler(this.txtStockQty_MouseHover);
			this.txtStockQty.Leave += new System.EventHandler(this.txtStockQty_Leave);
			// 
			// txtPurPrice
			// 
			this.txtPurPrice.Location = new System.Drawing.Point(134, 362);
			this.txtPurPrice.Name = "txtPurPrice";
			this.txtPurPrice.Size = new System.Drawing.Size(120, 21);
			this.txtPurPrice.TabIndex = 6;
			this.txtPurPrice.Text = "";
			this.txtPurPrice.MouseHover += new System.EventHandler(this.txtPurPrice_MouseHover);
			this.txtPurPrice.Leave += new System.EventHandler(this.txtPurPrice_Leave);
			// 
			// txtStockId
			// 
			this.txtStockId.Location = new System.Drawing.Point(470, 362);
			this.txtStockId.Name = "txtStockId";
			this.txtStockId.ReadOnly = true;
			this.txtStockId.Size = new System.Drawing.Size(120, 21);
			this.txtStockId.TabIndex = 8;
			this.txtStockId.Text = "";
			// 
			// btnOK
			// 
			this.btnOK.Location = new System.Drawing.Point(442, 448);
			this.btnOK.Name = "btnOK";
			this.btnOK.Size = new System.Drawing.Size(90, 34);
			this.btnOK.TabIndex = 13;

⌨️ 快捷键说明

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