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

📄 form_jzg.cs

📁 一个很简单的考试系统。实用性很强啊!数据库在里面
💻 CS
📖 第 1 页 / 共 5 页
字号:
			this.btn_sjr.Size = new System.Drawing.Size(64, 23);
			this.btn_sjr.TabIndex = 0;
			this.btn_sjr.Text = "首记录";
			this.btn_sjr.Click += new System.EventHandler(this.btn_sjr_Click);
			// 
			// pnl_jzg2
			// 
			this.pnl_jzg2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.pnl_jzg2.Controls.Add(this.btn_bj);
			this.pnl_jzg2.Controls.Add(this.btn_qx);
			this.pnl_jzg2.Controls.Add(this.btn_qyjr);
			this.pnl_jzg2.Controls.Add(this.btn_qdtj);
			this.pnl_jzg2.Controls.Add(this.btn_mjl);
			this.pnl_jzg2.Controls.Add(this.btn_sc);
			this.pnl_jzg2.Controls.Add(this.btn_sjr);
			this.pnl_jzg2.Controls.Add(this.btn_tj);
			this.pnl_jzg2.Controls.Add(this.btn_hyjl);
			this.pnl_jzg2.Controls.Add(this.btn_xxzl);
			this.pnl_jzg2.Dock = System.Windows.Forms.DockStyle.Bottom;
			this.pnl_jzg2.Location = new System.Drawing.Point(0, 517);
			this.pnl_jzg2.Name = "pnl_jzg2";
			this.pnl_jzg2.Size = new System.Drawing.Size(792, 56);
			this.pnl_jzg2.TabIndex = 2;
			// 
			// dgd_jzg
			// 
			this.dgd_jzg.DataMember = "";
			this.dgd_jzg.Dock = System.Windows.Forms.DockStyle.Top;
			this.dgd_jzg.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dgd_jzg.Location = new System.Drawing.Point(0, 0);
			this.dgd_jzg.Name = "dgd_jzg";
			this.dgd_jzg.ReadOnly = true;
			this.dgd_jzg.Size = new System.Drawing.Size(792, 288);
			this.dgd_jzg.TabIndex = 10;
			this.dgd_jzg.MouseUp += new System.Windows.Forms.MouseEventHandler(this.dgd_jzg_MouseUp_1);
			this.dgd_jzg.Navigate += new System.Windows.Forms.NavigateEventHandler(this.dgd_jzg_Navigate);
			// 
			// Form_jzg
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(792, 573);
			this.Controls.Add(this.pnl_jzg2);
			this.Controls.Add(this.pnl_jzg1);
			this.Controls.Add(this.dgd_jzg);
			this.Name = "Form_jzg";
			this.Text = "教职工资料维护";
			this.Load += new System.EventHandler(this.Form_jzg_Load);
			this.pnl_jzg1.ResumeLayout(false);
			this.pnl_jzg2.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.dgd_jzg)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		private void panel2_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
		{
		
		}

		private void btn_xxzl_Click(object sender, System.EventArgs e)
		{
			if(btn_xxzl.Text == "详细资料")
			{
				dgd_jzg.Visible = false;
				pnl_jzg1.Dock = System.Windows.Forms.DockStyle.Fill;
				btn_xxzl.Text = "返回";
			}
			else
			{
				dgd_jzg.Visible = true;
				pnl_jzg1.Dock = System.Windows.Forms.DockStyle.None;
				btn_xxzl.Text = "详细资料";
			}
		}

		private void lbl_jtzz_Click(object sender, System.EventArgs e)
		{
		
		}

		private void Form_jzg_Load(object sender, System.EventArgs e)
		{
			this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
			this.ControlBox = false;
			dbAccess dba=new dbAccess();
			sqlcon=new System.Data.SqlClient.SqlConnection(dba.connStr);
			sqlcon.Open();
			dat=new DataSet();
			this.LianJie();
			this.DataBings_data();
			this.Combo_Add();
			this.ConEnbFalse();
			this.btn_qx.Enabled=false;
			this.btn_qdtj.Enabled=false;
			if(dat.Tables[this.table_name].Rows.Count==0)
			{
				this.btn_sjr.Enabled=false;
				this.btn_qyjr.Enabled=false;
				this.btn_mjl.Enabled=false;
				this.btn_hyjl.Enabled=false;
				this.btn_bj.Enabled=false;
				this.btn_sc.Enabled=false;
				this.btn_qdtj.Enabled=false;
				this.btn_qx.Enabled=false;
			}
		}
		
		private void DataBings_data()
		{
			this.dgd_jzg.DataBindings.Clear();
			this.txt_xm.DataBindings.Clear();
			this.txt_zjgbh.DataBindings.Clear();
			this.cbb_xb.DataBindings.Clear();
			this.cbb_mz.DataBindings.Clear();
			this.dTP_csny.DataBindings.Clear();
			this.cbb_jg1.DataBindings.Clear();
			this.cbb_zzmm.DataBindings.Clear();
			this.cbb_hyzk.DataBindings.Clear();
			this.txt_sfzh.DataBindings.Clear();
			this.txt_lxdz.DataBindings.Clear();
			this.txt_lxdh.DataBindings.Clear();
			this.txt_dzyx.DataBindings.Clear();
			this.txt_yzbm.DataBindings.Clear();
			this.txt_jtzz.DataBindings.Clear();
			this.txt_jtdh.DataBindings.Clear();
			this.cbb_whcd.DataBindings.Clear();
			this.txt_byyx.DataBindings.Clear();
			this.txt_zy.DataBindings.Clear();
			this.cbb_zyjszw.DataBindings.Clear();
			this.txt_jszgzbh.DataBindings.Clear();
			this.dTP_fzrq.DataBindings.Clear();
			this.txt_fzbm.DataBindings.Clear();
			this.cbb_isT.DataBindings.Clear();
			this.dTP_sccymtsj.DataBindings.Clear();
			this.cbb_js.DataBindings.Clear();
			this.dTP_zjcymtsj.DataBindings.Clear();
			this.txt_bf.DataBindings.Clear();
			this.dgd_jzg.SetDataBinding(dat,this.table_name);
			this.txt_xm.DataBindings.Add("text",dat,this.table_name+".姓名");
			this.txt_zjgbh.DataBindings.Add("text",dat,this.table_name+".教职工编号");
			this.cbb_xb.DataBindings.Add("text",dat,this.table_name+".性别");
			this.cbb_mz.DataBindings.Add("text",dat,this.table_name+".民族");
			this.dTP_csny.DataBindings.Add("Value",dat,this.table_name+".出生年月");
			this.cbb_jg1.DataBindings.Add("text",dat,this.table_name+".籍贯");
			this.cbb_zzmm.DataBindings.Add("text",dat,this.table_name+".政治面貌");
			this.cbb_hyzk.DataBindings.Add("text",dat,this.table_name+".婚姻状况");
			this.txt_sfzh.DataBindings.Add("text",dat,this.table_name+".身份证号");
			this.txt_lxdz.DataBindings.Add("text",dat,this.table_name+".联系地址");
			this.txt_lxdh.DataBindings.Add("text",dat,this.table_name+".联系电话");
			this.txt_dzyx.DataBindings.Add("text",dat,this.table_name+".电子邮箱");
			this.txt_yzbm.DataBindings.Add("text",dat,this.table_name+".邮政编码");
			this.txt_jtzz.DataBindings.Add("text",dat,this.table_name+".家庭住址");
			this.txt_jtdh.DataBindings.Add("text",dat,this.table_name+".家庭电话");
			this.cbb_whcd.DataBindings.Add("text",dat,this.table_name+".文化程度");
			this.txt_byyx.DataBindings.Add("text",dat,this.table_name+".毕业院校");
			this.txt_zy.DataBindings.Add("text",dat,this.table_name+".专业");
			this.cbb_zyjszw.DataBindings.Add("text",dat,this.table_name+".专业技术职务");
			this.txt_jszgzbh.DataBindings.Add("text",dat,this.table_name+".教师资格证编号");
			this.dTP_fzrq.DataBindings.Add("Value",dat,this.table_name+".发证日期");
			this.txt_fzbm.DataBindings.Add("text",dat,this.table_name+".发证部门");
			this.cbb_isT.DataBindings.Add("text",dat,this.table_name+".是否教师");
			this.dTP_sccymtsj.DataBindings.Add("Value",dat,this.table_name+".首次参与命题时间");
			this.cbb_js.DataBindings.Add("text",dat,this.table_name+".角色");
			this.dTP_zjcymtsj.DataBindings.Add("Value",dat,this.table_name+".最近参与命题时间");
			this.txt_bf.DataBindings.Add("text",dat,this.table_name+".备注");
		}
		
		private string GetValue(string table,string columne,string valuse)
		{
			string select="select * from "+table+" where "+columne+"='"+ valuse +"'";
			System.Data.SqlClient.SqlDataAdapter sqladp_add=new System.Data.SqlClient.SqlDataAdapter(select,this.sqlcon);
			System.Data.DataSet dst_add=new System.Data.DataSet();
			sqladp_add.Fill(dst_add,table);
			//if (dst_add.Tables[table].Rows.Count>0)
			return dst_add.Tables[table].Rows[0][0].ToString();
		}
		private void Combo_Add()
		{
			try
			{
				System.Data.DataSet dat_mb=new System.Data.DataSet();
				System.Data.SqlClient.SqlCommand sqlcom_sex=new System.Data.SqlClient.SqlCommand();
				System.Data.SqlClient.SqlConnection sqlcon=new System.Data.SqlClient.SqlConnection();
				System.Data.SqlClient.SqlDataAdapter sqlada_mb=new System.Data.SqlClient.SqlDataAdapter("select * from sex",
					this.sqlcon);
				sqlada_mb.Fill(dat_mb,"sex");
				foreach (DataRow dater in dat_mb.Tables["sex"].Rows )
				{
					this.cbb_xb.Items.Add(dater[1]);
				}
				this.ConEnbTrue();
			}
			catch(System.Exception m)
			{
				MessageBox.Show(m.Message);
			}
			try
			{
				System.Data.DataSet dat_mb=new System.Data.DataSet();
				System.Data.SqlClient.SqlCommand sqlcom_sex=new System.Data.SqlClient.SqlCommand();
				System.Data.SqlClient.SqlConnection sqlcon=new System.Data.SqlClient.SqlConnection();
				System.Data.SqlClient.SqlDataAdapter sqlada_mb=new System.Data.SqlClient.SqlDataAdapter("select * from nation",
					this.sqlcon);
				sqlada_mb.Fill(dat_mb,"nation");
				foreach (DataRow dater in dat_mb.Tables["nation"].Rows )
				{
					this.cbb_mz.Items.Add(dater[1]);
				}
				this.ConEnbTrue();
			}
			catch(System.Exception m)
			{
				MessageBox.Show(m.Message);
			}
			try
			{
				System.Data.DataSet dat_mb=new System.Data.DataSet();
				System.Data.SqlClient.SqlCommand sqlcom_sex=new System.Data.SqlClient.SqlCommand();
				System.Data.SqlClient.SqlConnection sqlcon=new System.Data.SqlClient.SqlConnection();
				System.Data.SqlClient.SqlDataAdapter sqlada_mb=new System.Data.SqlClient.SqlDataAdapter("select * from technicalPosition",
					this.sqlcon);
				sqlada_mb.Fill(dat_mb,"technicalPosition");
				foreach (DataRow dater in dat_mb.Tables["technicalPosition"].Rows )
				{
					this.cbb_zyjszw.Items.Add(dater[1]);
				}
				this.ConEnbTrue();
			}
			catch(System.Exception m)
			{
				MessageBox.Show(m.Message);
			}
			try
			{
				System.Data.DataSet dat_mb=new System.Data.DataSet();
				System.Data.SqlClient.SqlCommand sqlcom_sex=new System.Data.SqlClient.SqlCommand();
				System.Data.SqlClient.SqlConnection sqlcon=new System.Data.SqlClient.SqlConnection();
				System.Data.SqlClient.SqlDataAdapter sqlada_mb=new System.Data.SqlClient.SqlDataAdapter("select * from Maritalstatus",
					this.sqlcon);
				sqlada_mb.Fill(dat_mb,"Maritalstatus");
				foreach (DataRow dater in dat_mb.Tables["Maritalstatus"].Rows )
				{
					this.cbb_hyzk.Items.Add(dater[1]);
				}
				this.ConEnbTrue();
			}
			catch(System.Exception m)
			{
				MessageBox.Show(m.Message);
			}
			try
			{
				System.Data.DataSet dat_mb=new System.Data.DataSet();
				System.Data.SqlClient.SqlCommand sqlcom_sex=new System.Data.SqlClient.SqlCommand();
				System.Data.SqlClient.SqlConnection sqlcon=new System.Data.SqlClient.SqlConnection();
				System.Data.SqlClient.SqlDataAdapter sqlada_mb=new System.Data.SqlClient.SqlDataAdapter("select * from PoliticalFeature",
					this.sqlcon);
				sqlada_mb.Fill(dat_mb,"PoliticalFeature");
				foreach (DataRow dater in dat_mb.Tables["PoliticalFeature"].Rows )
				{
					this.cbb_zzmm.Items.Add(dater[1]);
				}
				this.ConEnbTrue();
			}
			catch(System.Exception m)
			{
				MessageBox.Show(m.Message);
			}
			try
			{
				System.Data.DataSet dat_mb=new System.Data.DataSet();
				System.Data.SqlClient.SqlCommand sqlcom_sex=new System.Data.SqlClient.SqlCommand();
				System.Data.SqlClient.SqlConnection sqlcon=new System.Data.SqlClient.SqlConnection();
				System.Data.SqlClient.SqlDataAdapter sqlada_mb=new System.Data.SqlClient.SqlDataAdapter("select * from cultureDegree",
					this.sqlcon);
				sqlada_mb.Fill(dat_mb,"cultureDegree");
				foreach (DataRow dater in dat_mb.Tables["cultureDegree"].Rows )
				{
					this.cbb_whcd.Items.Add(dater[1]);
				}
				this.ConEnbTrue();
			}
			catch(System.Exception m)
			{
				MessageBox.Show(m.Message);
			}
			try
			{
				System.Data.DataSet dat_mb=new System.Data.DataSet();
				System.Data.SqlClient.SqlCommand sqlcom_sex=new System.Data.SqlClient.SqlCommand();
				System.Data.SqlClient.SqlConnection sqlcon=new System.Data.SqlClient.SqlConnection();
				System.Data.SqlClient.SqlDataAdapter sqlada_mb=new System.Data.SqlClient.SqlDataAdapter("select * from role where rol_no <> '1'",
					this.sqlcon);
				sqlada_mb.Fill(dat_mb,"role");
				foreach (DataRow dater in dat_mb.Tables["role"].Rows )
				{
					this.cbb_js.Items.Add(dater[1]);
				}
				this.ConEnbTrue();
			}
			catch(System.Exception m)
			{
				MessageBox.Show(m.Message);
			}
			try
			{
				System.Data.DataSet dat_mb=new System.Data.DataSet();
				System.Data.SqlClient.SqlCommand sqlcom_sex=new System.Data.SqlClient.SqlCommand();
				System.Data.SqlClient.SqlConnection sqlcon=new System.Data.SqlClient.SqlConnection();
				System.Data.SqlClient.SqlDataAdapter sqlada_mb=new System.Data.SqlClient.SqlDataAdapter("select * from nativePlace",
					this.sqlcon);
				sqlada_mb.Fill(dat_mb,"nativePlace");
				foreach (DataRow dater in dat_mb.Tables["nativePlace"].Rows )
				{
					this.cbb_jg1.Items.Add(dater[1]);
				}
				this.ConEnbTrue();
			}
			catch(System.Exception m)

⌨️ 快捷键说明

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