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

📄 addstuinfo.cs

📁 聊天系统的经
💻 CS
📖 第 1 页 / 共 3 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.IO;
using System.Data.OleDb;
using System.Data;


namespace 学生信息管理
{
	/// <summary>
	/// AddStuinfo 的摘要说明。
	/// 添加学生详细信息的类
	/// </summary>
	public class AddStuinfo : System.Windows.Forms.Form
	{
		private System.Windows.Forms.GroupBox grpStuinfos;
		private System.Windows.Forms.TextBox txtStu_TelPhone;
		private System.Windows.Forms.ComboBox cboStu_Special;
		private System.Windows.Forms.ComboBox cboStu_Love;
		private System.Windows.Forms.ComboBox cboStu_educational;
		private System.Windows.Forms.TextBox txtStu_FixTel;
		private System.Windows.Forms.TextBox txtStu_Address;
		private System.Windows.Forms.TextBox txtStu_NativePlace;
		private System.Windows.Forms.TextBox txtStu_Idcard;
		private System.Windows.Forms.RadioButton radFemale;
		private System.Windows.Forms.RadioButton radMale;
		private System.Windows.Forms.TextBox txtStu_Name;
		private System.Windows.Forms.TextBox txtStu_Id;
		private System.Windows.Forms.Label lblStu_Special;
		private System.Windows.Forms.Label lblStu_Love;
		private System.Windows.Forms.Label lblStu_TelPhone;
		private System.Windows.Forms.Label lblStu_FixTel;
		private System.Windows.Forms.Label lblStu_Address;
		private System.Windows.Forms.Label lblStu_NativePlace;
		private System.Windows.Forms.Label lblStu_educational;
		private System.Windows.Forms.Label lblStu_Race;
		private System.Windows.Forms.Label lblStu_Idcard;
		private System.Windows.Forms.Label lblStu_Sex;
		private System.Windows.Forms.Label lblStu_Name;
		private System.Windows.Forms.Label lblStu_Id;
		private System.Windows.Forms.Button btnOpenPhoto;
		private System.Windows.Forms.PictureBox picStu_Photo;
		private System.Windows.Forms.TextBox txtStu_Marks;
		private System.Windows.Forms.Label lblStu_Marks;
		private System.Windows.Forms.GroupBox grpStuHead;
		private System.Windows.Forms.GroupBox grpButtions;
		private System.Windows.Forms.Button button2;
		private System.Windows.Forms.Button btnAddInfo;
		private System.Windows.Forms.Button btnExit;
		private System.Windows.Forms.ComboBox cboStu_Race;
		private System.Windows.Forms.OpenFileDialog openFileDlg;
		private System.ComponentModel.IContainer components;
		private System.Windows.Forms.ImageList imgObj;

		private String filepath = String.Empty;   //存放相片路径
		private DBManagers db = new DBManagers(); //连接数据库的类
		private OleDbCommand cmd = null;
		//private String environmentpath = Environment.CurrentDirectory;  //取得当前环境的路径
	
		

		public AddStuinfo()
		{
			//
			// 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.components = new System.ComponentModel.Container();
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(AddStuinfo));
			this.grpStuinfos = new System.Windows.Forms.GroupBox();
			this.txtStu_TelPhone = new System.Windows.Forms.TextBox();
			this.cboStu_Special = new System.Windows.Forms.ComboBox();
			this.cboStu_Love = new System.Windows.Forms.ComboBox();
			this.cboStu_Race = new System.Windows.Forms.ComboBox();
			this.cboStu_educational = new System.Windows.Forms.ComboBox();
			this.txtStu_FixTel = new System.Windows.Forms.TextBox();
			this.txtStu_Address = new System.Windows.Forms.TextBox();
			this.txtStu_NativePlace = new System.Windows.Forms.TextBox();
			this.txtStu_Idcard = new System.Windows.Forms.TextBox();
			this.radFemale = new System.Windows.Forms.RadioButton();
			this.radMale = new System.Windows.Forms.RadioButton();
			this.txtStu_Name = new System.Windows.Forms.TextBox();
			this.txtStu_Id = new System.Windows.Forms.TextBox();
			this.lblStu_Special = new System.Windows.Forms.Label();
			this.lblStu_Love = new System.Windows.Forms.Label();
			this.lblStu_TelPhone = new System.Windows.Forms.Label();
			this.lblStu_FixTel = new System.Windows.Forms.Label();
			this.lblStu_Address = new System.Windows.Forms.Label();
			this.lblStu_NativePlace = new System.Windows.Forms.Label();
			this.lblStu_educational = new System.Windows.Forms.Label();
			this.lblStu_Race = new System.Windows.Forms.Label();
			this.lblStu_Idcard = new System.Windows.Forms.Label();
			this.lblStu_Sex = new System.Windows.Forms.Label();
			this.lblStu_Name = new System.Windows.Forms.Label();
			this.lblStu_Id = new System.Windows.Forms.Label();
			this.grpStuHead = new System.Windows.Forms.GroupBox();
			this.btnOpenPhoto = new System.Windows.Forms.Button();
			this.picStu_Photo = new System.Windows.Forms.PictureBox();
			this.txtStu_Marks = new System.Windows.Forms.TextBox();
			this.lblStu_Marks = new System.Windows.Forms.Label();
			this.grpButtions = new System.Windows.Forms.GroupBox();
			this.btnExit = new System.Windows.Forms.Button();
			this.button2 = new System.Windows.Forms.Button();
			this.btnAddInfo = new System.Windows.Forms.Button();
			this.openFileDlg = new System.Windows.Forms.OpenFileDialog();
			this.imgObj = new System.Windows.Forms.ImageList(this.components);
			this.grpStuinfos.SuspendLayout();
			this.grpStuHead.SuspendLayout();
			this.grpButtions.SuspendLayout();
			this.SuspendLayout();
			// 
			// grpStuinfos
			// 
			this.grpStuinfos.Controls.Add(this.txtStu_TelPhone);
			this.grpStuinfos.Controls.Add(this.cboStu_Special);
			this.grpStuinfos.Controls.Add(this.cboStu_Love);
			this.grpStuinfos.Controls.Add(this.cboStu_Race);
			this.grpStuinfos.Controls.Add(this.cboStu_educational);
			this.grpStuinfos.Controls.Add(this.txtStu_FixTel);
			this.grpStuinfos.Controls.Add(this.txtStu_Address);
			this.grpStuinfos.Controls.Add(this.txtStu_NativePlace);
			this.grpStuinfos.Controls.Add(this.txtStu_Idcard);
			this.grpStuinfos.Controls.Add(this.radFemale);
			this.grpStuinfos.Controls.Add(this.radMale);
			this.grpStuinfos.Controls.Add(this.txtStu_Name);
			this.grpStuinfos.Controls.Add(this.txtStu_Id);
			this.grpStuinfos.Controls.Add(this.lblStu_Special);
			this.grpStuinfos.Controls.Add(this.lblStu_Love);
			this.grpStuinfos.Controls.Add(this.lblStu_TelPhone);
			this.grpStuinfos.Controls.Add(this.lblStu_FixTel);
			this.grpStuinfos.Controls.Add(this.lblStu_Address);
			this.grpStuinfos.Controls.Add(this.lblStu_NativePlace);
			this.grpStuinfos.Controls.Add(this.lblStu_educational);
			this.grpStuinfos.Controls.Add(this.lblStu_Race);
			this.grpStuinfos.Controls.Add(this.lblStu_Idcard);
			this.grpStuinfos.Controls.Add(this.lblStu_Sex);
			this.grpStuinfos.Controls.Add(this.lblStu_Name);
			this.grpStuinfos.Controls.Add(this.lblStu_Id);
			this.grpStuinfos.Location = new System.Drawing.Point(8, 8);
			this.grpStuinfos.Name = "grpStuinfos";
			this.grpStuinfos.Size = new System.Drawing.Size(328, 432);
			this.grpStuinfos.TabIndex = 32;
			this.grpStuinfos.TabStop = false;
			this.grpStuinfos.Text = "学生基本细信息";
			// 
			// txtStu_TelPhone
			// 
			this.txtStu_TelPhone.Location = new System.Drawing.Point(117, 328);
			this.txtStu_TelPhone.MaxLength = 11;
			this.txtStu_TelPhone.Name = "txtStu_TelPhone";
			this.txtStu_TelPhone.Size = new System.Drawing.Size(176, 21);
			this.txtStu_TelPhone.TabIndex = 55;
			this.txtStu_TelPhone.Text = "";
			// 
			// cboStu_Special
			// 
			this.cboStu_Special.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.cboStu_Special.Items.AddRange(new object[] {
																"--请选择特长--",
																"汽车/购物",
																"旅游/度假",
																"体育/户外/健身",
																"运动/健身",
																"时尚/化妆品"});
			this.cboStu_Special.Location = new System.Drawing.Point(117, 400);
			this.cboStu_Special.Name = "cboStu_Special";
			this.cboStu_Special.Size = new System.Drawing.Size(176, 20);
			this.cboStu_Special.TabIndex = 54;
			// 
			// cboStu_Love
			// 
			this.cboStu_Love.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.cboStu_Love.Items.AddRange(new object[] {
															 "--请选择爱好--",
															 "上网聊天/交友",
															 "旅游/购物",
															 "听音乐/看电影",
															 "运动/健身",
															 "娱乐/追星",
															 "睡觉/发呆",
															 "时尚/美食"});
			this.cboStu_Love.Location = new System.Drawing.Point(117, 360);
			this.cboStu_Love.Name = "cboStu_Love";
			this.cboStu_Love.Size = new System.Drawing.Size(176, 20);
			this.cboStu_Love.TabIndex = 53;
			// 
			// cboStu_Race
			// 
			this.cboStu_Race.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.cboStu_Race.Items.AddRange(new object[] {
															 "汉族",
															 "侗族",
															 "布衣族",
															 "维吾尔族",
															 "蒙古族",
															 "苗族",
															 "白族",
															 "傣族",
															 "高山族",
															 "水族",
															 "达斡尔族",
															 "毛难族",
															 "阿昌族 ",
															 "普米族 ",
															 "俄罗斯族",
															 "门巴族",
															 "羌族",
															 "黎族",
															 "白族 ",
															 "瑶族",
															 "布朗族"});
			this.cboStu_Race.Location = new System.Drawing.Point(117, 160);
			this.cboStu_Race.Name = "cboStu_Race";
			this.cboStu_Race.Size = new System.Drawing.Size(176, 20);
			this.cboStu_Race.TabIndex = 52;
			// 
			// cboStu_educational
			// 
			this.cboStu_educational.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.cboStu_educational.Items.AddRange(new object[] {
																	"--请选择学历--",
																	"硕士",
																	"博士",
																	"大学",
																	"大专",
																	"高中",
																	"初中",
																	"小学"});
			this.cboStu_educational.Location = new System.Drawing.Point(117, 192);
			this.cboStu_educational.Name = "cboStu_educational";
			this.cboStu_educational.Size = new System.Drawing.Size(176, 20);
			this.cboStu_educational.TabIndex = 51;
			// 
			// txtStu_FixTel
			// 
			this.txtStu_FixTel.Location = new System.Drawing.Point(117, 296);
			this.txtStu_FixTel.MaxLength = 8;
			this.txtStu_FixTel.Name = "txtStu_FixTel";
			this.txtStu_FixTel.Size = new System.Drawing.Size(176, 21);
			this.txtStu_FixTel.TabIndex = 50;
			this.txtStu_FixTel.Text = "";
			// 
			// txtStu_Address
			// 
			this.txtStu_Address.Location = new System.Drawing.Point(117, 264);
			this.txtStu_Address.Name = "txtStu_Address";
			this.txtStu_Address.Size = new System.Drawing.Size(176, 21);
			this.txtStu_Address.TabIndex = 49;
			this.txtStu_Address.Text = "";
			// 
			// txtStu_NativePlace
			// 
			this.txtStu_NativePlace.Location = new System.Drawing.Point(117, 224);
			this.txtStu_NativePlace.Name = "txtStu_NativePlace";
			this.txtStu_NativePlace.Size = new System.Drawing.Size(176, 21);
			this.txtStu_NativePlace.TabIndex = 48;
			this.txtStu_NativePlace.Text = "";
			// 
			// txtStu_Idcard
			// 
			this.txtStu_Idcard.Location = new System.Drawing.Point(117, 128);
			this.txtStu_Idcard.MaxLength = 18;
			this.txtStu_Idcard.Name = "txtStu_Idcard";
			this.txtStu_Idcard.Size = new System.Drawing.Size(176, 21);
			this.txtStu_Idcard.TabIndex = 47;
			this.txtStu_Idcard.Text = "";
			// 
			// radFemale
			// 
			this.radFemale.Location = new System.Drawing.Point(189, 88);
			this.radFemale.Name = "radFemale";
			this.radFemale.Size = new System.Drawing.Size(72, 24);
			this.radFemale.TabIndex = 46;
			this.radFemale.Text = "女";
			// 
			// radMale
			// 

⌨️ 快捷键说明

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