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

📄 frmaddcategory.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 frmAddCategory.
	/// </summary>
	
	
	public class frmAddCategory : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label lblCatCode;
		private System.Windows.Forms.Label lblCatTitle;
		private System.Windows.Forms.Button btnCancel;
		private System.Windows.Forms.TextBox txtCatCode;
		private System.Windows.Forms.TextBox txtCatTitle;
		private System.Windows.Forms.TextBox txtCatDesc;
		private System.Windows.Forms.Button btnOK;
		private System.Windows.Forms.ComboBox cboFlvlCatCode;
		private System.Windows.Forms.NumericUpDown updRate;
		private System.ComponentModel.IContainer components;
		private System.Windows.Forms.ErrorProvider errCatValidation;        
		
		
		//other variables
		private Settings settings;
		private bool allValidated = false;
		private string errorMsg;
		private decimal rate;
		//private string catCode,flvlCatCode;
		private System.Windows.Forms.HelpProvider hlpNewCategory;
		private System.Windows.Forms.Label lblCatDesc;
		private System.Windows.Forms.Label lblFLvlCatCode;
		private System.Windows.Forms.Label lblRate;
		private System.Windows.Forms.ToolTip tipNewCategory;
	
		public frmAddCategory()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
            settings=new Settings ();
			this.hlpNewCategory.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.lblCatCode = new System.Windows.Forms.Label();
			this.lblCatTitle = new System.Windows.Forms.Label();
			this.lblCatDesc = new System.Windows.Forms.Label();
			this.lblFLvlCatCode = new System.Windows.Forms.Label();
			this.lblRate = new System.Windows.Forms.Label();
			this.txtCatCode = new System.Windows.Forms.TextBox();
			this.txtCatTitle = new System.Windows.Forms.TextBox();
			this.txtCatDesc = new System.Windows.Forms.TextBox();
			this.btnOK = new System.Windows.Forms.Button();
			this.btnCancel = new System.Windows.Forms.Button();
			this.cboFlvlCatCode = new System.Windows.Forms.ComboBox();
			this.updRate = new System.Windows.Forms.NumericUpDown();
			this.errCatValidation = new System.Windows.Forms.ErrorProvider();
			this.hlpNewCategory = new System.Windows.Forms.HelpProvider();
			this.tipNewCategory = new System.Windows.Forms.ToolTip(this.components);
			((System.ComponentModel.ISupportInitialize)(this.updRate)).BeginInit();
			this.SuspendLayout();
			// 
			// lblCatCode
			// 
			this.lblCatCode.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.lblCatCode.Location = new System.Drawing.Point(10, 26);
			this.lblCatCode.Name = "lblCatCode";
			this.lblCatCode.Size = new System.Drawing.Size(120, 25);
			this.lblCatCode.TabIndex = 0;
			this.lblCatCode.Text = "类别代码";
			this.lblCatCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// lblCatTitle
			// 
			this.lblCatTitle.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.lblCatTitle.Location = new System.Drawing.Point(10, 60);
			this.lblCatTitle.Name = "lblCatTitle";
			this.lblCatTitle.Size = new System.Drawing.Size(120, 25);
			this.lblCatTitle.TabIndex = 2;
			this.lblCatTitle.Text = "类别名称";
			this.lblCatTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// lblCatDesc
			// 
			this.lblCatDesc.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.lblCatDesc.Location = new System.Drawing.Point(10, 103);
			this.lblCatDesc.Name = "lblCatDesc";
			this.lblCatDesc.Size = new System.Drawing.Size(172, 25);
			this.lblCatDesc.TabIndex = 4;
			this.lblCatDesc.Text = "说明";
			this.lblCatDesc.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// lblFLvlCatCode
			// 
			this.lblFLvlCatCode.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.lblFLvlCatCode.Location = new System.Drawing.Point(10, 190);
			this.lblFLvlCatCode.Name = "lblFLvlCatCode";
			this.lblFLvlCatCode.Size = new System.Drawing.Size(163, 25);
			this.lblFLvlCatCode.TabIndex = 6;
			this.lblFLvlCatCode.Text = "第一层类别代码";
			this.lblFLvlCatCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// lblRate
			// 
			this.lblRate.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.lblRate.Location = new System.Drawing.Point(326, 26);
			this.lblRate.Name = "lblRate";
			this.lblRate.Size = new System.Drawing.Size(120, 25);
			this.lblRate.TabIndex = 8;
			this.lblRate.Text = "费率";
			this.lblRate.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// txtCatCode
			// 
			this.txtCatCode.Location = new System.Drawing.Point(173, 26);
			this.txtCatCode.Name = "txtCatCode";
			this.txtCatCode.Size = new System.Drawing.Size(120, 21);
			this.txtCatCode.TabIndex = 1;
			this.txtCatCode.Text = "";
			this.txtCatCode.MouseHover += new System.EventHandler(this.txtCatCode_MouseHover);
			this.txtCatCode.Leave += new System.EventHandler(this.txtCatCode_Leave);
			// 
			// txtCatTitle
			// 
			this.txtCatTitle.Location = new System.Drawing.Point(173, 60);
			this.txtCatTitle.Name = "txtCatTitle";
			this.txtCatTitle.Size = new System.Drawing.Size(120, 21);
			this.txtCatTitle.TabIndex = 3;
			this.txtCatTitle.Text = "";
			this.txtCatTitle.MouseHover += new System.EventHandler(this.txtCatTitle_MouseHover);
			this.txtCatTitle.Leave += new System.EventHandler(this.txtCatTitle_Leave);
			// 
			// txtCatDesc
			// 
			this.txtCatDesc.Location = new System.Drawing.Point(173, 103);
			this.txtCatDesc.Multiline = true;
			this.txtCatDesc.Name = "txtCatDesc";
			this.txtCatDesc.Size = new System.Drawing.Size(413, 69);
			this.txtCatDesc.TabIndex = 5;
			this.txtCatDesc.Text = "";
			this.txtCatDesc.MouseHover += new System.EventHandler(this.txtCatDesc_MouseHover);
			this.txtCatDesc.Leave += new System.EventHandler(this.txtCatDesc_Leave);
			// 
			// btnOK
			// 
			this.btnOK.Location = new System.Drawing.Point(182, 250);
			this.btnOK.Name = "btnOK";
			this.btnOK.Size = new System.Drawing.Size(90, 25);
			this.btnOK.TabIndex = 10;
			this.btnOK.Text = "确定";
			this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
			this.btnOK.MouseHover += new System.EventHandler(this.btnOK_MouseHover);
			// 
			// btnCancel
			// 
			this.btnCancel.Location = new System.Drawing.Point(320, 250);
			this.btnCancel.Name = "btnCancel";
			this.btnCancel.Size = new System.Drawing.Size(90, 25);
			this.btnCancel.TabIndex = 11;
			this.btnCancel.Text = "取消";
			this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
			this.btnCancel.MouseHover += new System.EventHandler(this.btnCancel_MouseHover);
			// 
			// cboFlvlCatCode
			// 
			this.cboFlvlCatCode.Location = new System.Drawing.Point(173, 190);
			this.cboFlvlCatCode.Name = "cboFlvlCatCode";
			this.cboFlvlCatCode.Size = new System.Drawing.Size(145, 20);
			this.cboFlvlCatCode.TabIndex = 7;
			this.cboFlvlCatCode.MouseHover += new System.EventHandler(this.cboFlvlCatCode_MouseHover);
			this.cboFlvlCatCode.Leave += new System.EventHandler(this.cboFlvlCatCode_Leave);
			// 
			// updRate
			// 
			this.updRate.Location = new System.Drawing.Point(374, 26);
			this.updRate.Name = "updRate";
			this.updRate.Size = new System.Drawing.Size(144, 21);
			this.updRate.TabIndex = 9;
			this.updRate.ValueChanged += new System.EventHandler(this.updRate_ValueChanged);
			this.updRate.Leave += new System.EventHandler(this.updRate_Leave);
			// 
			// errCatValidation
			// 
			this.errCatValidation.ContainerControl = this;
			// 
			// hlpNewCategory
			// 
			this.hlpNewCategory.HelpNamespace = "";
			// 
			// tipNewCategory
			// 
			this.tipNewCategory.AutomaticDelay = 150;
			// 
			// frmAddCategory
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(595, 315);
			this.Controls.Add(this.updRate);
			this.Controls.Add(this.cboFlvlCatCode);
			this.Controls.Add(this.btnCancel);
			this.Controls.Add(this.btnOK);
			this.Controls.Add(this.txtCatDesc);
			this.Controls.Add(this.txtCatTitle);
			this.Controls.Add(this.txtCatCode);
			this.Controls.Add(this.lblRate);
			this.Controls.Add(this.lblFLvlCatCode);
			this.Controls.Add(this.lblCatDesc);
			this.Controls.Add(this.lblCatTitle);
			this.Controls.Add(this.lblCatCode);
			this.HelpButton = true;
			this.hlpNewCategory.SetHelpKeyword(this, "adding new product categories");
			this.Name = "frmAddCategory";
			this.hlpNewCategory.SetShowHelp(this, true);
			this.Text = "添加新类别";
			this.Load += new System.EventHandler(this.frmAddCategory_Load);
			((System.ComponentModel.ISupportInitialize)(this.updRate)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		private void frmAddCategory_Load(object sender, System.EventArgs e)
		{

⌨️ 快捷键说明

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