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

📄 setorginfo.cs

📁 Visual C#.NET数据库开发经典案例解析,这里有1到3的案例
💻 CS
📖 第 1 页 / 共 3 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace 人力资源管理系统
{
	/// <summary>
	/// SetOrgInfo 的摘要说明。
	/// </summary>
	public class SetOrgInfo : System.Windows.Forms.Form
	{
		private DataTable tblSetOrgInfo = new DataTable();//储存读入的数据
		private string strTextBox3_Text = "";

		private System.Windows.Forms.TreeView treeView1;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.TextBox textBox3;
		private System.Windows.Forms.TextBox textBox2;
		private System.Windows.Forms.TextBox textBox1;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label1;
		private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
		private System.Windows.Forms.Button btnDelete;
		private System.Windows.Forms.Button btnNewChildClass;
		private System.Windows.Forms.Button btnNewThisClass;
		private System.Windows.Forms.Button btnNewFirstClass;
		private System.Windows.Forms.Button btnModify;
		private System.Windows.Forms.Button btnQuit;
		private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
		private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
		private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
		private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
		private System.Data.SqlClient.SqlConnection sqlConnection1;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public SetOrgInfo()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();

			//
			// 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()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(SetOrgInfo));
			this.treeView1 = new System.Windows.Forms.TreeView();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.textBox3 = new System.Windows.Forms.TextBox();
			this.textBox2 = new System.Windows.Forms.TextBox();
			this.textBox1 = new System.Windows.Forms.TextBox();
			this.label3 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.label1 = new System.Windows.Forms.Label();
			this.btnQuit = new System.Windows.Forms.Button();
			this.btnNewChildClass = new System.Windows.Forms.Button();
			this.btnNewThisClass = new System.Windows.Forms.Button();
			this.btnNewFirstClass = new System.Windows.Forms.Button();
			this.btnModify = new System.Windows.Forms.Button();
			this.btnDelete = new System.Windows.Forms.Button();
			this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
			this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
			this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
			this.groupBox1.SuspendLayout();
			this.SuspendLayout();
			// 
			// treeView1
			// 
			this.treeView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
				| System.Windows.Forms.AnchorStyles.Left)));
			this.treeView1.ImageIndex = -1;
			this.treeView1.Location = new System.Drawing.Point(0, 3);
			this.treeView1.Name = "treeView1";
			this.treeView1.SelectedImageIndex = -1;
			this.treeView1.Size = new System.Drawing.Size(240, 413);
			this.treeView1.TabIndex = 9;
			this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
			// 
			// groupBox1
			// 
			this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
				| System.Windows.Forms.AnchorStyles.Left) 
				| System.Windows.Forms.AnchorStyles.Right)));
			this.groupBox1.Controls.Add(this.textBox3);
			this.groupBox1.Controls.Add(this.textBox2);
			this.groupBox1.Controls.Add(this.textBox1);
			this.groupBox1.Controls.Add(this.label3);
			this.groupBox1.Controls.Add(this.label2);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Controls.Add(this.btnQuit);
			this.groupBox1.Controls.Add(this.btnNewChildClass);
			this.groupBox1.Controls.Add(this.btnNewThisClass);
			this.groupBox1.Controls.Add(this.btnNewFirstClass);
			this.groupBox1.Controls.Add(this.btnModify);
			this.groupBox1.Controls.Add(this.btnDelete);
			this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.groupBox1.Location = new System.Drawing.Point(248, -4);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(416, 420);
			this.groupBox1.TabIndex = 1;
			this.groupBox1.TabStop = false;
			// 
			// textBox3
			// 
			this.textBox3.Location = new System.Drawing.Point(56, 280);
			this.textBox3.Name = "textBox3";
			this.textBox3.ReadOnly = true;
			this.textBox3.Size = new System.Drawing.Size(176, 21);
			this.textBox3.TabIndex = 2;
			this.textBox3.Text = "";
			// 
			// textBox2
			// 
			this.textBox2.Location = new System.Drawing.Point(56, 200);
			this.textBox2.Name = "textBox2";
			this.textBox2.ReadOnly = true;
			this.textBox2.Size = new System.Drawing.Size(176, 21);
			this.textBox2.TabIndex = 1;
			this.textBox2.Text = "";
			// 
			// textBox1
			// 
			this.textBox1.Location = new System.Drawing.Point(56, 112);
			this.textBox1.Name = "textBox1";
			this.textBox1.Size = new System.Drawing.Size(176, 21);
			this.textBox1.TabIndex = 0;
			this.textBox1.Text = "";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(56, 240);
			this.label3.Name = "label3";
			this.label3.TabIndex = 14;
			this.label3.Text = "机构合成编码";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(56, 160);
			this.label2.Name = "label2";
			this.label2.TabIndex = 13;
			this.label2.Text = "本级别编码";
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(56, 80);
			this.label1.Name = "label1";
			this.label1.TabIndex = 12;
			this.label1.Text = "机构名称";
			// 
			// btnQuit
			// 
			this.btnQuit.Location = new System.Drawing.Point(280, 80);
			this.btnQuit.Name = "btnQuit";
			this.btnQuit.Size = new System.Drawing.Size(112, 23);
			this.btnQuit.TabIndex = 15;
			this.btnQuit.Text = "退出";
			this.btnQuit.Click += new System.EventHandler(this.btnQuit_Click);
			// 
			// btnNewChildClass
			// 
			this.btnNewChildClass.Location = new System.Drawing.Point(280, 240);
			this.btnNewChildClass.Name = "btnNewChildClass";
			this.btnNewChildClass.Size = new System.Drawing.Size(112, 23);
			this.btnNewChildClass.TabIndex = 6;
			this.btnNewChildClass.Text = "增加为子级别(&C)";
			this.btnNewChildClass.Click += new System.EventHandler(this.btnNewChildClass_Click);
			// 
			// btnNewThisClass
			// 
			this.btnNewThisClass.Location = new System.Drawing.Point(280, 200);
			this.btnNewThisClass.Name = "btnNewThisClass";
			this.btnNewThisClass.Size = new System.Drawing.Size(112, 23);
			this.btnNewThisClass.TabIndex = 5;
			this.btnNewThisClass.Text = "增加为本级别(&A)";
			this.btnNewThisClass.Click += new System.EventHandler(this.btnNewThisClass_Click);
			// 
			// btnNewFirstClass
			// 
			this.btnNewFirstClass.Location = new System.Drawing.Point(280, 160);
			this.btnNewFirstClass.Name = "btnNewFirstClass";
			this.btnNewFirstClass.Size = new System.Drawing.Size(112, 23);
			this.btnNewFirstClass.TabIndex = 4;
			this.btnNewFirstClass.Text = "增加为第一级(&B)";
			this.btnNewFirstClass.Click += new System.EventHandler(this.btnNewFirstClass_Click);

⌨️ 快捷键说明

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