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

📄 formnew.cs

📁 C#2.0宝典源码,C#经典书籍,很多例子
💻 CS
📖 第 1 页 / 共 3 页
字号:
using System;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using StudentsMIS.Business;
using StudentsMIS.CommonClassLibrary;
using StudentsMIS.DataAccess;

namespace StudentsMIS.WinForm
{
	/// <summary>
	/// FormNew 的摘要说明。
	/// </summary>
	public class FormNew : System.Windows.Forms.Form
	{
    private System.Windows.Forms.TabControl tabControl1;
    private System.Windows.Forms.TabPage tabPage1;
    private System.Windows.Forms.TabPage tabPage2;
    private System.Windows.Forms.TabPage tabPage3;
    private System.Windows.Forms.Button btnSubmit;
    private System.Windows.Forms.Button btnCancel;
    private System.Windows.Forms.PictureBox pictureBox1;
    private System.Windows.Forms.PictureBox pictureBox2;
    private System.Windows.Forms.PictureBox pictureBox3; 
    private System.Windows.Forms.Panel panel1;
    private System.Windows.Forms.Panel panel2;
    private System.Windows.Forms.Panel panel3;
    private System.Windows.Forms.Panel panel4;
    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 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 label18;
    private System.Windows.Forms.Label label19;
    private System.Windows.Forms.Label label20;       
    private System.Windows.Forms.ComboBox cmbBoxEnterYear;
    private System.Windows.Forms.ComboBox cmbBoxStuType;
    private System.Windows.Forms.ComboBox cmbBoxClass;
    private System.Windows.Forms.ComboBox cmbBoxSpeciality;
    private System.Windows.Forms.TextBox txtBoxStuID;    
    private System.Windows.Forms.TextBox txtBoxHomeTel;
    private System.Windows.Forms.TextBox txtBoxHomeAdd;
    private System.Windows.Forms.TextBox txtBoxFlatTel;
    private System.Windows.Forms.TextBox txtBoxMobile;
    private System.Windows.Forms.TextBox txtBoxEmail;
    private System.Windows.Forms.TextBox txtBoxName;
    private System.Windows.Forms.TextBox txtBoxIDCardNum;
    private System.Windows.Forms.DateTimePicker dateTimePickerBirth;
    private System.Windows.Forms.TextBox txtBoxNative;
    private System.Windows.Forms.RadioButton rdoBtnMale;
    private System.Windows.Forms.RadioButton rdoBtnFemale;
    private System.Windows.Forms.ToolTip toolTipHelp;
    private System.Windows.Forms.ComboBox cmbBoxCollege;
    private System.ComponentModel.IContainer components;

		public FormNew()
		{
			InitializeComponent();
      Bind_cmbBoxEnterYear();
      Bind_cmbBoxCollege();
      Bind_cmbBoxSpeciality("");
      Bind_cmbBoxClass("");
		}

		/// <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.components = new System.ComponentModel.Container();
      System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(FormNew));
      this.tabControl1 = new System.Windows.Forms.TabControl();
      this.tabPage1 = new System.Windows.Forms.TabPage();
      this.txtBoxNative = new System.Windows.Forms.TextBox();
      this.dateTimePickerBirth = new System.Windows.Forms.DateTimePicker();
      this.panel2 = new System.Windows.Forms.Panel();
      this.rdoBtnFemale = new System.Windows.Forms.RadioButton();
      this.rdoBtnMale = new System.Windows.Forms.RadioButton();
      this.txtBoxIDCardNum = new System.Windows.Forms.TextBox();
      this.txtBoxName = new System.Windows.Forms.TextBox();
      this.label6 = new System.Windows.Forms.Label();
      this.label5 = new System.Windows.Forms.Label();
      this.label4 = new System.Windows.Forms.Label();
      this.label3 = new System.Windows.Forms.Label();
      this.label1 = new System.Windows.Forms.Label();
      this.panel1 = new System.Windows.Forms.Panel();
      this.pictureBox1 = new System.Windows.Forms.PictureBox();
      this.label2 = new System.Windows.Forms.Label();
      this.tabPage2 = new System.Windows.Forms.TabPage();
      this.label15 = new System.Windows.Forms.Label();
      this.txtBoxStuID = new System.Windows.Forms.TextBox();
      this.label14 = new System.Windows.Forms.Label();
      this.cmbBoxStuType = new System.Windows.Forms.ComboBox();
      this.label13 = new System.Windows.Forms.Label();
      this.cmbBoxEnterYear = new System.Windows.Forms.ComboBox();
      this.cmbBoxClass = new System.Windows.Forms.ComboBox();
      this.label12 = new System.Windows.Forms.Label();
      this.label11 = new System.Windows.Forms.Label();
      this.cmbBoxSpeciality = new System.Windows.Forms.ComboBox();
      this.label10 = new System.Windows.Forms.Label();
      this.label9 = new System.Windows.Forms.Label();
      this.cmbBoxCollege = new System.Windows.Forms.ComboBox();
      this.label7 = new System.Windows.Forms.Label();
      this.pictureBox2 = new System.Windows.Forms.PictureBox();
      this.panel3 = new System.Windows.Forms.Panel();
      this.tabPage3 = new System.Windows.Forms.TabPage();
      this.txtBoxEmail = new System.Windows.Forms.TextBox();
      this.label20 = new System.Windows.Forms.Label();
      this.txtBoxMobile = new System.Windows.Forms.TextBox();
      this.label19 = new System.Windows.Forms.Label();
      this.txtBoxFlatTel = new System.Windows.Forms.TextBox();
      this.label18 = new System.Windows.Forms.Label();
      this.txtBoxHomeTel = new System.Windows.Forms.TextBox();
      this.label17 = new System.Windows.Forms.Label();
      this.label16 = new System.Windows.Forms.Label();
      this.txtBoxHomeAdd = new System.Windows.Forms.TextBox();
      this.pictureBox3 = new System.Windows.Forms.PictureBox();
      this.label8 = new System.Windows.Forms.Label();
      this.panel4 = new System.Windows.Forms.Panel();
      this.btnSubmit = new System.Windows.Forms.Button();
      this.btnCancel = new System.Windows.Forms.Button();
      this.toolTipHelp = new System.Windows.Forms.ToolTip(this.components);
      this.tabControl1.SuspendLayout();
      this.tabPage1.SuspendLayout();
      this.panel2.SuspendLayout();
      this.tabPage2.SuspendLayout();
      this.tabPage3.SuspendLayout();
      this.SuspendLayout();
      // 
      // tabControl1
      // 
      this.tabControl1.Controls.Add(this.tabPage1);
      this.tabControl1.Controls.Add(this.tabPage2);
      this.tabControl1.Controls.Add(this.tabPage3);
      this.tabControl1.Location = new System.Drawing.Point(8, 8);
      this.tabControl1.Name = "tabControl1";
      this.tabControl1.SelectedIndex = 0;
      this.tabControl1.Size = new System.Drawing.Size(464, 272);
      this.tabControl1.TabIndex = 0;
      // 
      // tabPage1
      // 
      this.tabPage1.BackColor = System.Drawing.Color.White;
      this.tabPage1.Controls.Add(this.txtBoxNative);
      this.tabPage1.Controls.Add(this.dateTimePickerBirth);
      this.tabPage1.Controls.Add(this.panel2);
      this.tabPage1.Controls.Add(this.txtBoxIDCardNum);
      this.tabPage1.Controls.Add(this.txtBoxName);
      this.tabPage1.Controls.Add(this.label6);
      this.tabPage1.Controls.Add(this.label5);
      this.tabPage1.Controls.Add(this.label4);
      this.tabPage1.Controls.Add(this.label3);
      this.tabPage1.Controls.Add(this.label1);
      this.tabPage1.Controls.Add(this.panel1);
      this.tabPage1.Controls.Add(this.pictureBox1);
      this.tabPage1.Controls.Add(this.label2);
      this.tabPage1.Location = new System.Drawing.Point(4, 21);
      this.tabPage1.Name = "tabPage1";
      this.tabPage1.Size = new System.Drawing.Size(456, 247);
      this.tabPage1.TabIndex = 0;
      this.tabPage1.Text = "基本信息";
      // 
      // txtBoxNative
      // 
      this.txtBoxNative.Location = new System.Drawing.Point(98, 200);
      this.txtBoxNative.Name = "txtBoxNative";
      this.txtBoxNative.Size = new System.Drawing.Size(118, 21);
      this.txtBoxNative.TabIndex = 15;
      this.txtBoxNative.Text = "";
      this.txtBoxNative.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.txtBoxNative_HelpRequested);
      // 
      // dateTimePickerBirth
      // 
      this.dateTimePickerBirth.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
      this.dateTimePickerBirth.Location = new System.Drawing.Point(98, 168);
      this.dateTimePickerBirth.Name = "dateTimePickerBirth";
      this.dateTimePickerBirth.Size = new System.Drawing.Size(120, 21);
      this.dateTimePickerBirth.TabIndex = 14;
      this.dateTimePickerBirth.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.dateTimePickerBirth_HelpRequested);
      // 
      // panel2
      // 
      this.panel2.Controls.Add(this.rdoBtnFemale);
      this.panel2.Controls.Add(this.rdoBtnMale);
      this.panel2.Location = new System.Drawing.Point(98, 97);
      this.panel2.Name = "panel2";
      this.panel2.Size = new System.Drawing.Size(104, 32);
      this.panel2.TabIndex = 13;
      // 
      // rdoBtnFemale
      // 
      this.rdoBtnFemale.Location = new System.Drawing.Point(56, 7);
      this.rdoBtnFemale.Name = "rdoBtnFemale";
      this.rdoBtnFemale.Size = new System.Drawing.Size(40, 24);
      this.rdoBtnFemale.TabIndex = 1;
      this.rdoBtnFemale.Text = "女";
      // 
      // rdoBtnMale
      // 
      this.rdoBtnMale.Checked = true;
      this.rdoBtnMale.Location = new System.Drawing.Point(8, 7);
      this.rdoBtnMale.Name = "rdoBtnMale";
      this.rdoBtnMale.Size = new System.Drawing.Size(32, 24);
      this.rdoBtnMale.TabIndex = 0;
      this.rdoBtnMale.TabStop = true;
      this.rdoBtnMale.Text = "男";
      // 
      // txtBoxIDCardNum
      // 
      this.txtBoxIDCardNum.Location = new System.Drawing.Point(98, 136);
      this.txtBoxIDCardNum.MaxLength = 18;
      this.txtBoxIDCardNum.Name = "txtBoxIDCardNum";
      this.txtBoxIDCardNum.Size = new System.Drawing.Size(150, 21);
      this.txtBoxIDCardNum.TabIndex = 12;
      this.txtBoxIDCardNum.Text = "";
      this.txtBoxIDCardNum.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.txtBoxIDCardNum_HelpRequested);
      // 
      // txtBoxName
      // 
      this.txtBoxName.Location = new System.Drawing.Point(98, 70);
      this.txtBoxName.MaxLength = 5;
      this.txtBoxName.Name = "txtBoxName";
      this.txtBoxName.Size = new System.Drawing.Size(78, 21);
      this.txtBoxName.TabIndex = 10;
      this.txtBoxName.Text = "";
      this.txtBoxName.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.txtBoxName_HelpRequested);
      // 
      // label6
      // 
      this.label6.Location = new System.Drawing.Point(32, 200);
      this.label6.Name = "label6";
      this.label6.Size = new System.Drawing.Size(56, 23);
      this.label6.TabIndex = 9;
      this.label6.Text = "籍贯:";
      this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
      // 
      // label5
      // 
      this.label5.Location = new System.Drawing.Point(16, 168);
      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.MiddleRight;
      // 
      // label4
      // 
      this.label4.Location = new System.Drawing.Point(32, 104);
      this.label4.Name = "label4";
      this.label4.Size = new System.Drawing.Size(56, 23);
      this.label4.TabIndex = 7;
      this.label4.Text = "性别:";
      this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
      // 
      // label3
      // 
      this.label3.Location = new System.Drawing.Point(16, 136);
      this.label3.Name = "label3";
      this.label3.RightToLeft = System.Windows.Forms.RightToLeft.No;
      this.label3.Size = new System.Drawing.Size(72, 23);
      this.label3.TabIndex = 6;
      this.label3.Text = "身份证号:";
      this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
      // 
      // label1
      // 
      this.label1.Location = new System.Drawing.Point(80, 22);
      this.label1.Name = "label1";
      this.label1.Size = new System.Drawing.Size(104, 16);
      this.label1.TabIndex = 5;
      this.label1.Text = "学生的基本信息";
      // 

⌨️ 快捷键说明

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