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

📄 frmselect.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.SqlClient;

namespace 教务管理系统
{
	/// <summary>
	/// frmSelect 的摘要说明。
	/// </summary>
	public class frmSelect : System.Windows.Forms.Form
	{
		internal System.Windows.Forms.GroupBox GroupBox2;
		internal System.Windows.Forms.Label Label9;
		internal System.Windows.Forms.DataGrid dgdSubject;
		internal System.Windows.Forms.Button btnDisplay;
		internal System.Windows.Forms.Button btnDel;
		internal System.Windows.Forms.Button btnSelect;
		internal System.Windows.Forms.Button btnSearch;
		internal System.Windows.Forms.Label Label8;
		internal System.Windows.Forms.TextBox txbCNumber;
		internal System.Windows.Forms.Label Label7;
		internal System.Windows.Forms.TextBox txbCId;
		internal System.Windows.Forms.Label Label6;
		internal System.Windows.Forms.TextBox txbCName;
		internal System.Windows.Forms.Label Label5;
		internal System.Windows.Forms.TextBox txbPY;
		internal System.Windows.Forms.GroupBox GroupBox1;
		internal System.Windows.Forms.DataGrid dgdList;
		internal System.Windows.Forms.GroupBox grbTop;
		internal System.Windows.Forms.Label Label4;
		internal System.Windows.Forms.Label Label3;
		internal System.Windows.Forms.TextBox txbGrade;
		internal System.Windows.Forms.TextBox txbName;
		internal System.Windows.Forms.Label Label2;
		internal System.Windows.Forms.Label Label1;
		internal System.Windows.Forms.TextBox txbId;

		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;
		// added parameter
		private DataTable dtData;
		private DataTable dtSubject;

		public frmSelect()
		{
			//
			// 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()
		{
			this.GroupBox2 = new System.Windows.Forms.GroupBox();
			this.Label9 = new System.Windows.Forms.Label();
			this.dgdSubject = new System.Windows.Forms.DataGrid();
			this.btnDisplay = new System.Windows.Forms.Button();
			this.btnDel = new System.Windows.Forms.Button();
			this.btnSelect = new System.Windows.Forms.Button();
			this.btnSearch = new System.Windows.Forms.Button();
			this.Label8 = new System.Windows.Forms.Label();
			this.txbCNumber = new System.Windows.Forms.TextBox();
			this.Label7 = new System.Windows.Forms.Label();
			this.txbCId = new System.Windows.Forms.TextBox();
			this.Label6 = new System.Windows.Forms.Label();
			this.txbCName = new System.Windows.Forms.TextBox();
			this.Label5 = new System.Windows.Forms.Label();
			this.txbPY = new System.Windows.Forms.TextBox();
			this.GroupBox1 = new System.Windows.Forms.GroupBox();
			this.dgdList = new System.Windows.Forms.DataGrid();
			this.grbTop = new System.Windows.Forms.GroupBox();
			this.Label4 = new System.Windows.Forms.Label();
			this.Label3 = new System.Windows.Forms.Label();
			this.txbGrade = new System.Windows.Forms.TextBox();
			this.txbName = new System.Windows.Forms.TextBox();
			this.Label2 = new System.Windows.Forms.Label();
			this.Label1 = new System.Windows.Forms.Label();
			this.txbId = new System.Windows.Forms.TextBox();
			this.GroupBox2.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.dgdSubject)).BeginInit();
			this.GroupBox1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.dgdList)).BeginInit();
			this.grbTop.SuspendLayout();
			this.SuspendLayout();
			// 
			// GroupBox2
			// 
			this.GroupBox2.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.GroupBox2.Controls.Add(this.Label9);
			this.GroupBox2.Controls.Add(this.dgdSubject);
			this.GroupBox2.Controls.Add(this.btnDisplay);
			this.GroupBox2.Controls.Add(this.btnDel);
			this.GroupBox2.Controls.Add(this.btnSelect);
			this.GroupBox2.Controls.Add(this.btnSearch);
			this.GroupBox2.Controls.Add(this.Label8);
			this.GroupBox2.Controls.Add(this.txbCNumber);
			this.GroupBox2.Controls.Add(this.Label7);
			this.GroupBox2.Controls.Add(this.txbCId);
			this.GroupBox2.Controls.Add(this.Label6);
			this.GroupBox2.Controls.Add(this.txbCName);
			this.GroupBox2.Controls.Add(this.Label5);
			this.GroupBox2.Controls.Add(this.txbPY);
			this.GroupBox2.Location = new System.Drawing.Point(0, 173);
			this.GroupBox2.Name = "GroupBox2";
			this.GroupBox2.Size = new System.Drawing.Size(533, 126);
			this.GroupBox2.TabIndex = 8;
			this.GroupBox2.TabStop = false;
			this.GroupBox2.Text = "课程信息";
			// 
			// Label9
			// 
			this.Label9.Location = new System.Drawing.Point(216, 37);
			this.Label9.Name = "Label9";
			this.Label9.Size = new System.Drawing.Size(320, 37);
			this.Label9.TabIndex = 16;
			this.Label9.Text = "选择相应的课程序号,单击【选课】按钮,系统先检查该课程编号是否已选或上课时间是否冲突,注意一个课程编号可以对应多个课序号,既一门课在多个时间上的情况。";
			// 
			// dgdSubject
			// 
			this.dgdSubject.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.dgdSubject.CaptionVisible = false;
			this.dgdSubject.DataMember = "";
			this.dgdSubject.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dgdSubject.Location = new System.Drawing.Point(2, 82);
			this.dgdSubject.Name = "dgdSubject";
			this.dgdSubject.Size = new System.Drawing.Size(529, 41);
			this.dgdSubject.TabIndex = 15;
			// 
			// btnDisplay
			// 
			this.btnDisplay.Location = new System.Drawing.Point(427, 12);
			this.btnDisplay.Name = "btnDisplay";
			this.btnDisplay.Size = new System.Drawing.Size(53, 21);
			this.btnDisplay.TabIndex = 14;
			this.btnDisplay.Text = "显示课表";
			this.btnDisplay.Click += new System.EventHandler(this.btnDisplay_Click);
			// 
			// btnDel
			// 
			this.btnDel.Location = new System.Drawing.Point(367, 12);
			this.btnDel.Name = "btnDel";
			this.btnDel.Size = new System.Drawing.Size(40, 21);
			this.btnDel.TabIndex = 13;
			this.btnDel.Text = "删除";
			this.btnDel.Click += new System.EventHandler(this.btnDel_Click);
			// 
			// btnSelect
			// 
			this.btnSelect.Location = new System.Drawing.Point(307, 12);
			this.btnSelect.Name = "btnSelect";
			this.btnSelect.Size = new System.Drawing.Size(40, 21);
			this.btnSelect.TabIndex = 12;
			this.btnSelect.Text = "选课";
			this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click);
			// 
			// btnSearch
			// 
			this.btnSearch.Location = new System.Drawing.Point(240, 12);
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.Size = new System.Drawing.Size(40, 21);
			this.btnSearch.TabIndex = 11;
			this.btnSearch.Text = "查询";
			this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
			// 
			// Label8
			// 
			this.Label8.Location = new System.Drawing.Point(112, 48);
			this.Label8.Name = "Label8";
			this.Label8.Size = new System.Drawing.Size(46, 14);
			this.Label8.TabIndex = 10;
			this.Label8.Text = "  课序号";
			// 
			// txbCNumber
			// 
			this.txbCNumber.Location = new System.Drawing.Point(160, 45);
			this.txbCNumber.Name = "txbCNumber";
			this.txbCNumber.Size = new System.Drawing.Size(47, 20);
			this.txbCNumber.TabIndex = 9;
			this.txbCNumber.Text = "";
			this.txbCNumber.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txbCNumber_KeyDown);
			// 
			// Label7
			// 
			this.Label7.Location = new System.Drawing.Point(0, 48);
			this.Label7.Name = "Label7";
			this.Label7.Size = new System.Drawing.Size(47, 14);
			this.Label7.TabIndex = 8;
			this.Label7.Text = "课程编号";
			// 
			// txbCId
			// 
			this.txbCId.Location = new System.Drawing.Point(48, 45);
			this.txbCId.Name = "txbCId";
			this.txbCId.Size = new System.Drawing.Size(46, 20);
			this.txbCId.TabIndex = 7;
			this.txbCId.Text = "";
			this.txbCId.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txbCId_KeyDown);
			// 
			// Label6
			// 
			this.Label6.Location = new System.Drawing.Point(112, 19);
			this.Label6.Name = "Label6";
			this.Label6.Size = new System.Drawing.Size(46, 14);
			this.Label6.TabIndex = 6;
			this.Label6.Text = "课程名称";
			// 
			// txbCName
			// 
			this.txbCName.Location = new System.Drawing.Point(160, 15);
			this.txbCName.Name = "txbCName";
			this.txbCName.Size = new System.Drawing.Size(47, 20);
			this.txbCName.TabIndex = 5;
			this.txbCName.Text = "";
			this.txbCName.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txbCName_KeyDown);
			// 
			// Label5
			// 
			this.Label5.Location = new System.Drawing.Point(0, 19);
			this.Label5.Name = "Label5";
			this.Label5.Size = new System.Drawing.Size(47, 14);
			this.Label5.TabIndex = 4;
			this.Label5.Text = "课程拼音";
			// 
			// txbPY
			// 
			this.txbPY.Location = new System.Drawing.Point(48, 15);
			this.txbPY.Name = "txbPY";
			this.txbPY.Size = new System.Drawing.Size(46, 20);
			this.txbPY.TabIndex = 3;
			this.txbPY.Text = "";
			this.txbPY.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txbPY_KeyDown);
			// 
			// GroupBox1
			// 
			this.GroupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
				| System.Windows.Forms.AnchorStyles.Right)));
			this.GroupBox1.Controls.Add(this.dgdList);
			this.GroupBox1.Location = new System.Drawing.Point(0, 61);
			this.GroupBox1.Name = "GroupBox1";
			this.GroupBox1.Size = new System.Drawing.Size(533, 112);
			this.GroupBox1.TabIndex = 7;
			this.GroupBox1.TabStop = false;
			this.GroupBox1.Text = "已选课程";
			// 
			// dgdList
			// 
			this.dgdList.CaptionVisible = false;
			this.dgdList.DataMember = "";
			this.dgdList.Dock = System.Windows.Forms.DockStyle.Fill;
			this.dgdList.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dgdList.Location = new System.Drawing.Point(3, 16);
			this.dgdList.Name = "dgdList";
			this.dgdList.Size = new System.Drawing.Size(527, 93);
			this.dgdList.TabIndex = 0;
			// 
			// grbTop
			// 
			this.grbTop.Controls.Add(this.Label4);
			this.grbTop.Controls.Add(this.Label3);
			this.grbTop.Controls.Add(this.txbGrade);
			this.grbTop.Controls.Add(this.txbName);
			this.grbTop.Controls.Add(this.Label2);
			this.grbTop.Controls.Add(this.Label1);

⌨️ 快捷键说明

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