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

📄 editing.cs

📁 东软内部材料(六)ado .net相关
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace Editing___Start
{
	/// <summary>
	/// Summary description for Form1.
	/// </summary>
	public class frmEditing : 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.TextBox txtWorkingID;
		private System.Windows.Forms.TextBox txtWorkingFirstName;
		private System.Windows.Forms.TextBox txtWorkingLastName;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.TextBox txtOriginalID;
		private System.Windows.Forms.TextBox txtOriginalFirstName;
		private System.Windows.Forms.TextBox txtOriginalLastName;
		private System.Windows.Forms.TextBox txtCurrentLastName;
		private System.Windows.Forms.TextBox txtCurrentFirstName;
		private System.Windows.Forms.TextBox txtCurrentID;
		private System.Windows.Forms.GroupBox gbRowStatus;
		private System.Windows.Forms.RadioButton rbUnchanged;
		private System.Windows.Forms.RadioButton rbChanged;
		private System.Windows.Forms.RadioButton rbNew;
		private System.Windows.Forms.Button btnFirst;
		private System.Windows.Forms.Button btnPrevious;
		private System.Windows.Forms.Button btnNext;
		private System.Windows.Forms.Button btnLast;
		private System.Windows.Forms.TextBox txtPosition;
		private System.Windows.Forms.Button btnSave;
		private System.Windows.Forms.Button btnAdd;
		private System.Windows.Forms.Button btnDelete;
		private System.Windows.Forms.Button btnEdit;
		private System.Windows.Forms.Button btnDefer;
		private System.Windows.Forms.Button btnUpdate;
		private System.Windows.Forms.Button btnCmd;
		private System.Windows.Forms.Button btnFill;
		private System.Windows.Forms.Button btnAccept;
		private System.Windows.Forms.Button btnReject;
		private System.Data.SqlClient.SqlDataAdapter daEmployeeList;
		private System.Data.SqlClient.SqlCommand cmdSelectEmployees;
		private System.Data.SqlClient.SqlCommand cmdInsertEmployees;
		private System.Data.SqlClient.SqlCommand cmdUpdateEmployees;
		private System.Data.SqlClient.SqlCommand cmdDeleteEmployees;
		private System.Data.SqlClient.SqlConnection cnNorthwind;
		private Editing___Start.dsEmployeeList dsEmployeeList1;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public frmEditing()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
			this.daEmployeeList.Fill(this.dsEmployeeList1.Employees);
			UpdateDisplay();
		}

		/// <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.label1 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.txtWorkingID = new System.Windows.Forms.TextBox();
			this.dsEmployeeList1 = new Editing___Start.dsEmployeeList();
			this.txtWorkingFirstName = new System.Windows.Forms.TextBox();
			this.txtWorkingLastName = new System.Windows.Forms.TextBox();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.gbRowStatus = new System.Windows.Forms.GroupBox();
			this.rbNew = new System.Windows.Forms.RadioButton();
			this.rbChanged = new System.Windows.Forms.RadioButton();
			this.rbUnchanged = new System.Windows.Forms.RadioButton();
			this.txtCurrentLastName = new System.Windows.Forms.TextBox();
			this.txtCurrentFirstName = new System.Windows.Forms.TextBox();
			this.txtCurrentID = new System.Windows.Forms.TextBox();
			this.txtOriginalLastName = new System.Windows.Forms.TextBox();
			this.txtOriginalFirstName = new System.Windows.Forms.TextBox();
			this.txtOriginalID = new System.Windows.Forms.TextBox();
			this.label5 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.btnFirst = new System.Windows.Forms.Button();
			this.btnPrevious = new System.Windows.Forms.Button();
			this.btnNext = new System.Windows.Forms.Button();
			this.btnLast = new System.Windows.Forms.Button();
			this.txtPosition = new System.Windows.Forms.TextBox();
			this.btnSave = new System.Windows.Forms.Button();
			this.btnAdd = new System.Windows.Forms.Button();
			this.btnDelete = new System.Windows.Forms.Button();
			this.btnEdit = new System.Windows.Forms.Button();
			this.btnDefer = new System.Windows.Forms.Button();
			this.btnUpdate = new System.Windows.Forms.Button();
			this.btnCmd = new System.Windows.Forms.Button();
			this.btnFill = new System.Windows.Forms.Button();
			this.btnAccept = new System.Windows.Forms.Button();
			this.btnReject = new System.Windows.Forms.Button();
			this.daEmployeeList = new System.Data.SqlClient.SqlDataAdapter();
			this.cmdDeleteEmployees = new System.Data.SqlClient.SqlCommand();
			this.cnNorthwind = new System.Data.SqlClient.SqlConnection();
			this.cmdInsertEmployees = new System.Data.SqlClient.SqlCommand();
			this.cmdSelectEmployees = new System.Data.SqlClient.SqlCommand();
			this.cmdUpdateEmployees = new System.Data.SqlClient.SqlCommand();
			((System.ComponentModel.ISupportInitialize)(this.dsEmployeeList1)).BeginInit();
			this.groupBox1.SuspendLayout();
			this.gbRowStatus.SuspendLayout();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.AutoSize = true;
			this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.label1.Location = new System.Drawing.Point(8, 20);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(72, 13);
			this.label1.TabIndex = 0;
			this.label1.Text = "EmployeeID:";
			// 
			// label2
			// 
			this.label2.AutoSize = true;
			this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.label2.Location = new System.Drawing.Point(8, 52);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(65, 13);
			this.label2.TabIndex = 1;
			this.label2.Text = "First Name:";
			// 
			// label3
			// 
			this.label3.AutoSize = true;
			this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.label3.Location = new System.Drawing.Point(8, 84);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(64, 13);
			this.label3.TabIndex = 2;
			this.label3.Text = "Last Name:";
			// 
			// txtWorkingID
			// 
			this.txtWorkingID.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dsEmployeeList1, "Employees.EmployeeID"));
			this.txtWorkingID.Location = new System.Drawing.Point(88, 16);
			this.txtWorkingID.Name = "txtWorkingID";
			this.txtWorkingID.ReadOnly = true;
			this.txtWorkingID.Size = new System.Drawing.Size(32, 20);
			this.txtWorkingID.TabIndex = 3;
			this.txtWorkingID.TabStop = false;
			this.txtWorkingID.Text = "W ID";
			// 
			// dsEmployeeList1
			// 
			this.dsEmployeeList1.DataSetName = "dsEmployeeList";
			this.dsEmployeeList1.Locale = new System.Globalization.CultureInfo("en-US");
			this.dsEmployeeList1.Namespace = "http://www.tempuri.org/dsEmployeeList.xsd";
			// 
			// txtWorkingFirstName
			// 
			this.txtWorkingFirstName.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dsEmployeeList1, "Employees.FirstName"));
			this.txtWorkingFirstName.Location = new System.Drawing.Point(88, 48);
			this.txtWorkingFirstName.Name = "txtWorkingFirstName";
			this.txtWorkingFirstName.TabIndex = 4;
			this.txtWorkingFirstName.Text = "Working First";
			// 
			// txtWorkingLastName
			// 
			this.txtWorkingLastName.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dsEmployeeList1, "Employees.LastName"));
			this.txtWorkingLastName.Location = new System.Drawing.Point(88, 80);
			this.txtWorkingLastName.Name = "txtWorkingLastName";
			this.txtWorkingLastName.TabIndex = 5;
			this.txtWorkingLastName.Text = "Working Last";
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
																					this.gbRowStatus,
																					this.txtCurrentLastName,
																					this.txtCurrentFirstName,
																					this.txtCurrentID,
																					this.txtOriginalLastName,
																					this.txtOriginalFirstName,
																					this.txtOriginalID,
																					this.label5,
																					this.label4});
			this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.groupBox1.Location = new System.Drawing.Point(8, 112);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(328, 144);
			this.groupBox1.TabIndex = 6;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "Row Versions";
			// 
			// gbRowStatus
			// 
			this.gbRowStatus.Controls.AddRange(new System.Windows.Forms.Control[] {
																					  this.rbNew,
																					  this.rbChanged,
																					  this.rbUnchanged});
			this.gbRowStatus.Location = new System.Drawing.Point(16, 80);
			this.gbRowStatus.Name = "gbRowStatus";
			this.gbRowStatus.Size = new System.Drawing.Size(280, 48);
			this.gbRowStatus.TabIndex = 8;
			this.gbRowStatus.TabStop = false;
			this.gbRowStatus.Text = "RowStatus:";
			// 
			// rbNew
			// 
			this.rbNew.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.rbNew.Location = new System.Drawing.Point(200, 24);
			this.rbNew.Name = "rbNew";
			this.rbNew.Size = new System.Drawing.Size(48, 16);
			this.rbNew.TabIndex = 2;
			this.rbNew.Text = "New";
			// 
			// rbChanged
			// 
			this.rbChanged.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.rbChanged.Location = new System.Drawing.Point(112, 24);
			this.rbChanged.Name = "rbChanged";
			this.rbChanged.Size = new System.Drawing.Size(72, 16);
			this.rbChanged.TabIndex = 1;
			this.rbChanged.Text = "Modified";
			// 
			// rbUnchanged
			// 
			this.rbUnchanged.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.rbUnchanged.Location = new System.Drawing.Point(16, 24);
			this.rbUnchanged.Name = "rbUnchanged";
			this.rbUnchanged.Size = new System.Drawing.Size(80, 16);
			this.rbUnchanged.TabIndex = 0;
			this.rbUnchanged.Text = "Unchanged";
			// 
			// txtCurrentLastName
			// 
			this.txtCurrentLastName.Location = new System.Drawing.Point(208, 48);
			this.txtCurrentLastName.Name = "txtCurrentLastName";
			this.txtCurrentLastName.TabIndex = 7;
			this.txtCurrentLastName.Text = "Current Last";
			// 
			// txtCurrentFirstName
			// 
			this.txtCurrentFirstName.Location = new System.Drawing.Point(104, 48);
			this.txtCurrentFirstName.Name = "txtCurrentFirstName";
			this.txtCurrentFirstName.TabIndex = 6;
			this.txtCurrentFirstName.Text = "Current First";
			// 
			// txtCurrentID
			// 
			this.txtCurrentID.Location = new System.Drawing.Point(64, 48);
			this.txtCurrentID.Name = "txtCurrentID";
			this.txtCurrentID.Size = new System.Drawing.Size(32, 20);
			this.txtCurrentID.TabIndex = 5;
			this.txtCurrentID.Text = "C ID";
			// 
			// txtOriginalLastName
			// 
			this.txtOriginalLastName.Location = new System.Drawing.Point(208, 24);
			this.txtOriginalLastName.Name = "txtOriginalLastName";
			this.txtOriginalLastName.TabIndex = 4;
			this.txtOriginalLastName.Text = "Original Last";
			// 
			// txtOriginalFirstName
			// 
			this.txtOriginalFirstName.Location = new System.Drawing.Point(104, 24);
			this.txtOriginalFirstName.Name = "txtOriginalFirstName";
			this.txtOriginalFirstName.TabIndex = 3;
			this.txtOriginalFirstName.Text = "Original First";
			// 
			// txtOriginalID
			// 
			this.txtOriginalID.Location = new System.Drawing.Point(62, 24);
			this.txtOriginalID.Name = "txtOriginalID";
			this.txtOriginalID.Size = new System.Drawing.Size(32, 20);
			this.txtOriginalID.TabIndex = 2;
			this.txtOriginalID.Text = "O ID";
			// 
			// label5
			// 
			this.label5.AutoSize = true;
			this.label5.Location = new System.Drawing.Point(8, 52);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(47, 13);
			this.label5.TabIndex = 1;
			this.label5.Text = "Current:";
			// 
			// label4
			// 
			this.label4.AutoSize = true;
			this.label4.Location = new System.Drawing.Point(8, 28);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(49, 13);
			this.label4.TabIndex = 0;
			this.label4.Text = "Original:";
			// 
			// btnFirst
			// 

⌨️ 快捷键说明

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