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

📄 副本 addupdateform.cs

📁 《数据库原理及应用》-刘玉宝主编-源代码
💻 CS
📖 第 1 页 / 共 5 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace KTMIS
{
	/// <summary>
	/// AddUpdateForm 的摘要说明。
	/// </summary>
	public class AddUpdateForm : System.Windows.Forms.Form
	{
		private System.Data.SqlClient.SqlConnection sqlConnection;
		private System.Data.SqlClient.SqlCommand sqlCommand;
		private System.Data.SqlClient.SqlCommand storedProcedure;		
		private System.Data.SqlClient.SqlDataReader sqlDataReader;

		private System.Windows.Forms.TextBox tbC;
		private System.Windows.Forms.TextBox tbM;
		private System.Windows.Forms.Label lCollegeNa;

		private System.Data.DataRow dataRow;
		private ArrayList newTaskArrayList;

		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.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.Label label11;
		private System.Windows.Forms.Label label18;
		private System.Windows.Forms.Label label19;
		private System.Windows.Forms.Label label20;
		private System.Windows.Forms.Label label21;
		private System.Windows.Forms.Label label22;
		private System.Windows.Forms.Label label23;
		private System.Windows.Forms.ComboBox cmbSortNa;
		private System.Windows.Forms.ComboBox cmbLevelNa;
		private System.Windows.Forms.DateTimePicker dtpYear;
		private System.Windows.Forms.Button btnOK;
		private System.Windows.Forms.Button btnCancel;
		private System.Windows.Forms.ListBox lbSortCo;
		private System.Windows.Forms.ListBox lbLevelCo;
		private System.Windows.Forms.ListBox lbCollegeCo;
		private System.Windows.Forms.TextBox tbCollegeNa1;
		private System.Windows.Forms.TextBox tbMemberNa1;
		private System.Windows.Forms.TextBox tbCollegeNa2;
		private System.Windows.Forms.TextBox tbCollegeNa3;
		private System.Windows.Forms.TextBox tbCollegeNa4;
		private System.Windows.Forms.TextBox tbCollegeNa5;
		private System.Windows.Forms.TextBox tbMemberNa2;
		private System.Windows.Forms.TextBox tbMemberNa3;
		private System.Windows.Forms.TextBox tbMemberNa4;
		private System.Windows.Forms.TextBox tbMemberNa5;
		private System.Windows.Forms.GroupBox grbMember;
		private System.Windows.Forms.GroupBox grbTaskCo;
		private System.Windows.Forms.TextBox tbTaskCo;
		private System.Windows.Forms.Button btnCommit;
		private System.Windows.Forms.Button btnBack;
		private System.Windows.Forms.ListBox lbMemberCo;
		private System.Windows.Forms.ComboBox cmbMemberNa;
		private System.Windows.Forms.ComboBox cmbCollegeNa;
		private System.Windows.Forms.Panel panelMember;
		private System.Windows.Forms.Label label24;
		private System.Windows.Forms.Label label25;
		private System.Windows.Forms.Button btnUpdate5;
		private System.Windows.Forms.Button btnUpdate4;
		private System.Windows.Forms.Button btnUpdate3;
		private System.Windows.Forms.Button btnUpdate2;
		private System.Windows.Forms.Button btnUpdate1;
		private System.Windows.Forms.Button btnDelete5;
		private System.Windows.Forms.Button btnDelete4;
		private System.Windows.Forms.Button btnDelete3;
		private System.Windows.Forms.Button btnDelete2;
		private System.Windows.Forms.Button btnDelete1;
		private System.Windows.Forms.TextBox tbTaskName;
		private System.Windows.Forms.NumericUpDown nudStandard;
		private System.Windows.Forms.NumericUpDown nudAlready;
		private System.Windows.Forms.NumericUpDown nudSurplus;
		private System.Windows.Forms.TextBox tbTel;
		private System.Windows.Forms.TextBox tbEmail;
		private System.Windows.Forms.TextBox tbRemark;
		private System.Windows.Forms.ComboBox cmbCollege;
		private System.Windows.Forms.Label label12;
		private System.Windows.Forms.Label label13;
		private System.Windows.Forms.Label label14;
		private System.Windows.Forms.Label label15;
		private System.Windows.Forms.Label label16;
		private System.Windows.Forms.Label label17;
		private System.Windows.Forms.Label label26;
		private System.Windows.Forms.Label label27;
		private System.Windows.Forms.Label label28;
		private System.Windows.Forms.Button btnDeleteMain;
		private System.Windows.Forms.Button btnUpdateMain;
		private System.Windows.Forms.TextBox tbMemberNaMain;
		private System.Windows.Forms.TextBox tbCollegeNaMain;
		private System.Windows.Forms.Label lCollegeNaMain;
		private System.Windows.Forms.Label lCollegeNa5;
		private System.Windows.Forms.Label lCollegeNa4;
		private System.Windows.Forms.Label lCollegeNa3;
		private System.Windows.Forms.Label lCollegeNa2;
		private System.Windows.Forms.Label lCollegeNa1;
		private System.Windows.Forms.TextBox tbStart;
		private System.Windows.Forms.TextBox tbPlan;
		private System.Windows.Forms.TextBox tbEnd;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

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

			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
			this.sqlCommand = new System.Data.SqlClient.SqlCommand();
			this.storedProcedure = new System.Data.SqlClient.SqlCommand();
			this.storedProcedure.CommandType = System.Data.CommandType.StoredProcedure;
			this.newTaskArrayList = new ArrayList();
		}

		/// <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(AddUpdateForm));
			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.cmbSortNa = new System.Windows.Forms.ComboBox();
			this.cmbLevelNa = new System.Windows.Forms.ComboBox();
			this.dtpYear = new System.Windows.Forms.DateTimePicker();
			this.label5 = new System.Windows.Forms.Label();
			this.tbTaskName = new System.Windows.Forms.TextBox();
			this.label6 = new System.Windows.Forms.Label();
			this.grbMember = new System.Windows.Forms.GroupBox();
			this.panelMember = new System.Windows.Forms.Panel();
			this.btnCommit = new System.Windows.Forms.Button();
			this.btnBack = new System.Windows.Forms.Button();
			this.cmbMemberNa = new System.Windows.Forms.ComboBox();
			this.cmbCollegeNa = new System.Windows.Forms.ComboBox();
			this.label24 = new System.Windows.Forms.Label();
			this.label25 = new System.Windows.Forms.Label();
			this.tbMemberNaMain = new System.Windows.Forms.TextBox();
			this.tbCollegeNaMain = new System.Windows.Forms.TextBox();
			this.btnDelete5 = new System.Windows.Forms.Button();
			this.btnDelete4 = new System.Windows.Forms.Button();
			this.btnDelete3 = new System.Windows.Forms.Button();
			this.btnDelete2 = new System.Windows.Forms.Button();
			this.btnDelete1 = new System.Windows.Forms.Button();
			this.btnUpdate5 = new System.Windows.Forms.Button();
			this.btnUpdate4 = new System.Windows.Forms.Button();
			this.btnUpdate3 = new System.Windows.Forms.Button();
			this.btnUpdate2 = new System.Windows.Forms.Button();
			this.btnUpdate1 = new System.Windows.Forms.Button();
			this.tbMemberNa5 = new System.Windows.Forms.TextBox();
			this.tbMemberNa4 = new System.Windows.Forms.TextBox();
			this.tbMemberNa3 = new System.Windows.Forms.TextBox();
			this.tbMemberNa2 = new System.Windows.Forms.TextBox();
			this.tbCollegeNa5 = new System.Windows.Forms.TextBox();
			this.tbCollegeNa4 = new System.Windows.Forms.TextBox();
			this.tbCollegeNa3 = new System.Windows.Forms.TextBox();
			this.tbCollegeNa2 = new System.Windows.Forms.TextBox();
			this.tbMemberNa1 = new System.Windows.Forms.TextBox();
			this.tbCollegeNa1 = new System.Windows.Forms.TextBox();
			this.label23 = new System.Windows.Forms.Label();
			this.label22 = new System.Windows.Forms.Label();
			this.label21 = new System.Windows.Forms.Label();
			this.label20 = new System.Windows.Forms.Label();
			this.label19 = new System.Windows.Forms.Label();
			this.label18 = new System.Windows.Forms.Label();
			this.lCollegeNa5 = new System.Windows.Forms.Label();
			this.lCollegeNa4 = new System.Windows.Forms.Label();
			this.lCollegeNa3 = new System.Windows.Forms.Label();
			this.lCollegeNa2 = new System.Windows.Forms.Label();
			this.lCollegeNa1 = new System.Windows.Forms.Label();
			this.lCollegeNaMain = new System.Windows.Forms.Label();
			this.label11 = new System.Windows.Forms.Label();
			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.lbCollegeCo = new System.Windows.Forms.ListBox();
			this.lbMemberCo = new System.Windows.Forms.ListBox();
			this.btnUpdateMain = new System.Windows.Forms.Button();
			this.btnDeleteMain = new System.Windows.Forms.Button();
			this.btnOK = new System.Windows.Forms.Button();
			this.btnCancel = new System.Windows.Forms.Button();
			this.lbSortCo = new System.Windows.Forms.ListBox();
			this.lbLevelCo = new System.Windows.Forms.ListBox();
			this.grbTaskCo = new System.Windows.Forms.GroupBox();
			this.tbTaskCo = new System.Windows.Forms.TextBox();
			this.nudStandard = new System.Windows.Forms.NumericUpDown();
			this.nudAlready = new System.Windows.Forms.NumericUpDown();
			this.nudSurplus = new System.Windows.Forms.NumericUpDown();
			this.tbTel = new System.Windows.Forms.TextBox();
			this.tbEmail = new System.Windows.Forms.TextBox();
			this.tbRemark = new System.Windows.Forms.TextBox();
			this.cmbCollege = new System.Windows.Forms.ComboBox();
			this.label12 = new System.Windows.Forms.Label();
			this.label13 = new System.Windows.Forms.Label();
			this.label14 = new System.Windows.Forms.Label();
			this.label15 = new System.Windows.Forms.Label();
			this.label16 = new System.Windows.Forms.Label();
			this.label17 = new System.Windows.Forms.Label();
			this.label26 = new System.Windows.Forms.Label();
			this.label27 = new System.Windows.Forms.Label();
			this.label28 = new System.Windows.Forms.Label();
			this.tbStart = new System.Windows.Forms.TextBox();
			this.tbPlan = new System.Windows.Forms.TextBox();
			this.tbEnd = new System.Windows.Forms.TextBox();
			this.grbMember.SuspendLayout();
			this.panelMember.SuspendLayout();
			this.grbTaskCo.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.nudStandard)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.nudAlready)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.nudSurplus)).BeginInit();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(624, 104);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(72, 23);
			this.label1.TabIndex = 0;
			this.label1.Text = "选择分类:";
			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(624, 136);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(72, 23);
			this.label2.TabIndex = 1;
			this.label2.Text = "选择级别:";
			this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(624, 168);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(72, 23);
			this.label3.TabIndex = 2;
			this.label3.Text = "选择年份:";
			this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(624, 240);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(72, 23);
			this.label4.TabIndex = 3;
			this.label4.Text = "拟结日期:";
			this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// cmbSortNa
			// 
			this.cmbSortNa.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.cmbSortNa.Location = new System.Drawing.Point(696, 104);
			this.cmbSortNa.Name = "cmbSortNa";
			this.cmbSortNa.Size = new System.Drawing.Size(128, 20);
			this.cmbSortNa.TabIndex = 6;
			this.cmbSortNa.Tag = "0";
			this.cmbSortNa.SelectionChangeCommitted += new System.EventHandler(this.cmbSortNa_SelectionChangeCommitted);
			// 
			// cmbLevelNa
			// 
			this.cmbLevelNa.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.cmbLevelNa.Location = new System.Drawing.Point(696, 136);
			this.cmbLevelNa.Name = "cmbLevelNa";
			this.cmbLevelNa.Size = new System.Drawing.Size(128, 20);
			this.cmbLevelNa.TabIndex = 7;
			this.cmbLevelNa.Tag = "0";
			this.cmbLevelNa.SelectionChangeCommitted += new System.EventHandler(this.cmbLevelNa_SelectionChangeCommitted);
			// 
			// dtpYear
			// 
			this.dtpYear.CustomFormat = "yyyy";
			this.dtpYear.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
			this.dtpYear.Location = new System.Drawing.Point(696, 168);
			this.dtpYear.MaxDate = new System.DateTime(2079, 6, 6, 0, 0, 0, 0);
			this.dtpYear.MinDate = new System.DateTime(1900, 1, 1, 0, 0, 0, 0);
			this.dtpYear.Name = "dtpYear";
			this.dtpYear.Size = new System.Drawing.Size(128, 21);
			this.dtpYear.TabIndex = 8;
			// 
			// label5
			// 
			this.label5.Location = new System.Drawing.Point(16, 16);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(72, 23);
			this.label5.TabIndex = 8;
			this.label5.Text = "课题名称:";
			this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// tbTaskName
			// 
			this.tbTaskName.Location = new System.Drawing.Point(88, 16);
			this.tbTaskName.Name = "tbTaskName";
			this.tbTaskName.Size = new System.Drawing.Size(520, 21);
			this.tbTaskName.TabIndex = 0;
			this.tbTaskName.Tag = "0";
			this.tbTaskName.Text = "";
			// 
			// label6
			// 
			this.label6.Location = new System.Drawing.Point(16, 32);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(96, 23);
			this.label6.TabIndex = 10;
			this.label6.Text = "【 主负责人 】";
			this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// grbMember
			// 
			this.grbMember.Controls.Add(this.panelMember);
			this.grbMember.Controls.Add(this.tbMemberNaMain);
			this.grbMember.Controls.Add(this.tbCollegeNaMain);
			this.grbMember.Controls.Add(this.btnDelete5);
			this.grbMember.Controls.Add(this.btnDelete4);
			this.grbMember.Controls.Add(this.btnDelete3);
			this.grbMember.Controls.Add(this.btnDelete2);
			this.grbMember.Controls.Add(this.btnDelete1);

⌨️ 快捷键说明

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