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

📄 memberform.cs

📁 c#编写的人事管理系统源码 写得不错 值得收藏
💻 CS
📖 第 1 页 / 共 5 页
字号:
			this.dataGrid3.Dock = System.Windows.Forms.DockStyle.Fill;
			this.dataGrid3.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid3.Location = new System.Drawing.Point(0, 0);
			this.dataGrid3.Name = "dataGrid3";
			this.dataGrid3.Size = new System.Drawing.Size(920, 348);
			this.dataGrid3.TabIndex = 0;
			// 
			// tabPage5
			// 
			this.tabPage5.Controls.Add(this.dataGrid4);
			this.tabPage5.Location = new System.Drawing.Point(4, 24);
			this.tabPage5.Name = "tabPage5";
			this.tabPage5.Size = new System.Drawing.Size(920, 348);
			this.tabPage5.TabIndex = 4;
			this.tabPage5.Text = "培训记录";
			// 
			// dataGrid4
			// 
			this.dataGrid4.DataMember = "";
			this.dataGrid4.Dock = System.Windows.Forms.DockStyle.Fill;
			this.dataGrid4.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid4.Location = new System.Drawing.Point(0, 0);
			this.dataGrid4.Name = "dataGrid4";
			this.dataGrid4.Size = new System.Drawing.Size(920, 348);
			this.dataGrid4.TabIndex = 0;
			// 
			// tabPage6
			// 
			this.tabPage6.Controls.Add(this.dataGrid5);
			this.tabPage6.Location = new System.Drawing.Point(4, 24);
			this.tabPage6.Name = "tabPage6";
			this.tabPage6.Size = new System.Drawing.Size(920, 348);
			this.tabPage6.TabIndex = 5;
			this.tabPage6.Text = "奖惩记录";
			// 
			// dataGrid5
			// 
			this.dataGrid5.DataMember = "";
			this.dataGrid5.Dock = System.Windows.Forms.DockStyle.Fill;
			this.dataGrid5.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid5.Location = new System.Drawing.Point(0, 0);
			this.dataGrid5.Name = "dataGrid5";
			this.dataGrid5.Size = new System.Drawing.Size(920, 348);
			this.dataGrid5.TabIndex = 0;
			// 
			// tabPage7
			// 
			this.tabPage7.Controls.Add(this.dataGrid6);
			this.tabPage7.Location = new System.Drawing.Point(4, 24);
			this.tabPage7.Name = "tabPage7";
			this.tabPage7.Size = new System.Drawing.Size(920, 348);
			this.tabPage7.TabIndex = 6;
			this.tabPage7.Text = "职称评定";
			// 
			// dataGrid6
			// 
			this.dataGrid6.DataMember = "";
			this.dataGrid6.Dock = System.Windows.Forms.DockStyle.Fill;
			this.dataGrid6.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid6.Location = new System.Drawing.Point(0, 0);
			this.dataGrid6.Name = "dataGrid6";
			this.dataGrid6.Size = new System.Drawing.Size(920, 348);
			this.dataGrid6.TabIndex = 0;
			// 
			// tabPage8
			// 
			this.tabPage8.Controls.Add(this.dataGrid7);
			this.tabPage8.Location = new System.Drawing.Point(4, 24);
			this.tabPage8.Name = "tabPage8";
			this.tabPage8.Size = new System.Drawing.Size(920, 348);
			this.tabPage8.TabIndex = 7;
			this.tabPage8.Text = "休假记录";
			// 
			// dataGrid7
			// 
			this.dataGrid7.DataMember = "";
			this.dataGrid7.Dock = System.Windows.Forms.DockStyle.Fill;
			this.dataGrid7.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid7.Location = new System.Drawing.Point(0, 0);
			this.dataGrid7.Name = "dataGrid7";
			this.dataGrid7.Size = new System.Drawing.Size(920, 348);
			this.dataGrid7.TabIndex = 0;
			// 
			// printDialog1
			// 
			this.printDialog1.AllowSelection = true;
			this.printDialog1.AllowSomePages = true;
			this.printDialog1.Document = this.printDocument1;
			this.printDialog1.ShowHelp = true;
			// 
			// printDocument1
			// 
			this.printDocument1.OriginAtMargins = true;
			this.printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument1_PrintPage);
			// 
			// printPreviewDialog1
			// 
			this.printPreviewDialog1.AutoScrollMargin = new System.Drawing.Size(0, 0);
			this.printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
			this.printPreviewDialog1.ClientSize = new System.Drawing.Size(400, 300);
			this.printPreviewDialog1.Document = this.printDocument1;
			this.printPreviewDialog1.Enabled = true;
			this.printPreviewDialog1.Icon = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog1.Icon")));
			this.printPreviewDialog1.Location = new System.Drawing.Point(354, 14);
			this.printPreviewDialog1.MinimumSize = new System.Drawing.Size(375, 250);
			this.printPreviewDialog1.Name = "printPreviewDialog1";
			this.printPreviewDialog1.TransparencyKey = System.Drawing.Color.Empty;
			this.printPreviewDialog1.UseAntiAlias = true;
			this.printPreviewDialog1.Visible = false;
			// 
			// pageSetupDialog1
			// 
			this.pageSetupDialog1.Document = this.printDocument1;
			this.pageSetupDialog1.ShowHelp = true;
			// 
			// MemberForm
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(928, 405);
			this.ContextMenu = this.contextMenu1;
			this.Controls.Add(this.Degree_txt);
			this.Controls.Add(this.toolBar1);
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "MemberForm";
			this.Text = "员工个人资料";
			this.Closing += new System.ComponentModel.CancelEventHandler(this.MemberForm_Closing);
			this.Load += new System.EventHandler(this.MemberForm_Load);
			this.Degree_txt.ResumeLayout(false);
			this.tabPage1.ResumeLayout(false);
			this.tabPage2.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
			this.tabPage3.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.dataGrid2)).EndInit();
			this.tabPage4.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.dataGrid3)).EndInit();
			this.tabPage5.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.dataGrid4)).EndInit();
			this.tabPage6.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.dataGrid5)).EndInit();
			this.tabPage7.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.dataGrid6)).EndInit();
			this.tabPage8.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.dataGrid7)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		#region  窗体加载,有关数据进行绑定
		private void MemberForm_Load(object sender, System.EventArgs e)
		{
			empInfoForm.eif.Enabled = false;
			DBTextBox();
			DBDataGrid(int.Parse(this.No_txt.Text.Trim()));
			Base b = new Base();
			b.ReadImage(int.Parse(this.No_txt.Text.Trim()),this.pictureBox1);
			switch(Form1.f1.power)
			{
				case "系统管理员":
				{
					this.toolBarButton5.Enabled = true;
					this.toolBarButton6.Enabled = true;
					this.toolBarButton7.Enabled = true;
					break;
				}
				case "管理员":
				{
					this.toolBarButton5.Enabled = true;
					this.toolBarButton6.Enabled = true;
					this.toolBarButton7.Enabled = true;
					break;
				}
				case "一般用户":
				{
					this.toolBarButton5.Enabled = false;
					this.toolBarButton6.Enabled = false;
					this.toolBarButton7.Enabled = false;
					break;
				}
				default :
				{
					this.toolBarButton5.Enabled = false;
					this.toolBarButton6.Enabled = false;
					this.toolBarButton7.Enabled = false;
					break;
				}
			}
		}
		#endregion

		#region  文本框的数据绑定
		private void DBTextBox()
		{
			empInfoForm.eif.dataGrid1.CurrentRowIndex = empInfoForm.eif.cm.Position;
		    this.No_txt.DataBindings.Add("Text",empInfoForm.eif.table,"员工编号");
			this.Name_txt.DataBindings.Add("Text",empInfoForm.eif.table,"员工姓名");
			this.Sex_txt.DataBindings.Add("Text",empInfoForm.eif.table,"性别");
			this.Race_txt.DataBindings.Add("Text",empInfoForm.eif.table,"民族");
			this.Mag_txt.DataBindings.Add("Text",empInfoForm.eif.table,"婚姻状况");
			this.Party_txt.DataBindings.Add("Text",empInfoForm.eif.table,"党派");
			this.Birth_txt.DataBindings.Add("Text",empInfoForm.eif.table,"出生日期");
			this.Number_txt.DataBindings.Add("Text",empInfoForm.eif.table,"身份证号");
			this.Place_txt.DataBindings.Add("Text",empInfoForm.eif.table,"籍贯");
			this.Phone_txt.DataBindings.Add("Text",empInfoForm.eif.table,"联系电话");
			this.Adress_txt.DataBindings.Add("Text",empInfoForm.eif.table,"联系地址");
			this.Edu_txt.DataBindings.Add("Text",empInfoForm.eif.table,"学历");
			this.Pro_txt.DataBindings.Add("Text",empInfoForm.eif.table,"专业");
			this.Degree_txt.DataBindings.Add("Text",empInfoForm.eif.table,"学位");
			this.School_txt.DataBindings.Add("Text",empInfoForm.eif.table,"毕业学校");
			this.LeaveSchool_txt.DataBindings.Add("Text",empInfoForm.eif.table,"毕业时间");
			this.Emptime_txt.DataBindings.Add("Text",empInfoForm.eif.table,"聘用时间");
			this.Type_txt.DataBindings.Add("Text",empInfoForm.eif.table,"聘用方式");
			this.Source_txt.DataBindings.Add("Text",empInfoForm.eif.table,"聘用来源");
			this.App_txt.DataBindings.Add("Text",empInfoForm.eif.table,"员工状态");
			this.Section_txt.DataBindings.Add("Text",empInfoForm.eif.table,"所在部门");
			this.Job_txt.DataBindings.Add("Text",empInfoForm.eif.table,"所任职务");
			this.Title_txt.DataBindings.Add("Text",empInfoForm.eif.table,"所获职称");
			this.EenMen_txt.DataBindings.Add("Text",empInfoForm.eif.table,"养老保险号");
			this.Med_txt.DataBindings.Add("Text",empInfoForm.eif.table,"医疗保险号");
			this.Wa_txt.DataBindings.Add("Text",empInfoForm.eif.table,"工资号");
		}
		#endregion

		#region  DataGrid的数据绑定
		private void DBDataGrid(int n)
		{
			#region  绑定 社会关系 数据表
		    string s1 = "select EmployInfo.eId as 员工编号,EmployInfo.eName as 员工姓名,SocietyInfo.sName as 姓名,SocietyInfo.sLaction as 关系,";
			s1 += "SocietyInfo.sUinte as 工作单位和职务,SocietyInfo.sRemarks as 备注 from SocietyInfo,EmployInfo where SocietyInfo.seId=EmployInfo.seId ";
			s1 += "and EmployInfo.eId=" + n;
			DataTable dt1 = new DataTable();
			Base b1 = new Base();
			dt1 = b1.ExeSQLdt(s1);
			this.dataGrid1.DataSource = dt1.DefaultView;
			#endregion

			#region 绑定工作关系 数据表
			string s2 = "select EmployInfo.eId as 员工编号,EmployInfo.eName as 员工姓名,WorkInfo.wName as 工作单位,WorkInfo.wJob as 职务,WorkInfo.wFdate as 开始时间,";
			s2 += "WorkInfo.wLdate as 结束时间 from EmployInfo,WorkInfo where EmployInfo.wId=WorkInfo.wId and EmployInfo.eId=" + n;
			DataTable dt2 = new DataTable();
			Base b2 = new Base();
			dt2 = b2.ExeSQLdt(s2);
			this.dataGrid2.DataSource = dt2.DefaultView;
			#endregion

			#region  绑定 调动记录 数据表
			string s3 = "select EmployInfo.eId as 员工编号,EmployInfo.eName as 员工姓名,TransferInfo.tDate as 调动时间,TransferInfo.fSection as 调动前部门,";
			s3 += "TransferInfo.lSection as 调动后部门,TransferInfo.fJob as 调动前职务,TransferInfo.lJob as 调动后职务,TransferInfo.tReason as 调动原因,TransferInfo.tApp as 批准人,TransferInfo.tRemarks as [备注] ";
			s3 += " from TransferInfo,EmployInfo where EmployInfo.traId=TransferInfo.traId and EmployInfo.eId=" + int.Parse(this.No_txt.Text.Trim());
			DataTable dt3 = new DataTable();
			Base b3 = new Base();
			dt3 = b3.ExeSQLdt(s3);
			this.dataGrid3.DataSource = dt3.DefaultView;
			#endregion

			#region  绑定 培训记录 数据表
			string s4 = "select EmployInfo.eId as 员工编号,EmployInfo.eName as 员工姓名,TrainInfo.trName as 培训名称,TrainInfo.trContext as 培训内容,";
			s4 += "TrainInfo.trUnit as 培训单位,TrainInfo.trAddr as 培训地点,TrainInfo.trExp as 培训费用,TrainInfo.trResulte as 培训结果,TrainInfo.trFdate as 培训开始时间,";
			s4 += "TrainInfo.trLdate as 培训结束时间,TrainInfo.trRemarks as 备注 from TrainInfo,EmployInfo where TrainInfo.trId=EmployInfo.trId and EmployInfo.eId=" + n;
			DataTable dt4 = new DataTable();
			Base b4 = new Base();
			dt4 = b4.ExeSQLdt(s4);
			this.dataGrid4.DataSource = dt4.DefaultView;
			#endregion

			#region  绑定 奖惩记录 数据表
			string s5 = "select EmployInfo.eId as 员工编号,EmployInfo.eName as 员工姓名,PpInfo.pDate as 奖惩时间,PpInfo.pType as 奖惩类别,";
			s5 += "PpInfo.pReason as 奖惩原因,PpInfo.pContext as 奖惩内容,PpInfo.pAppS as 批准部门,PpInfo.pApp as 批准人,PpInfo.pRepealDate as 撤消日期,";
			s5 += "PpInfo.pRepealReason as 撤消原因,PpInfo.pRemarks as [备注] from PpInfo,EmployInfo where EmployInfo.pId=PpInfo.pId and EmployInfo.eId=" + n;
			DataTable dt5 = new DataTable();
			Base b5 = new Base();
			dt5 = b5.ExeSQLdt(s5);
			this.dataGrid5.DataSource = dt5.DefaultView;
			#endregion

			#region 绑定 职称评定 数据表
			string s6 = "select EmployInfo.eId as 员工编号,EmployInfo.eName as 员工姓名,TitleInfo.tTitle as 评定的职称,TitleInfo.tType as 取得方式,";
			s6 += "TitleInfo.tEmpdate as 取得时间,TitleInfo.tEmpTime as 截止时间,TitleInfo.tSection as 聘用单位,TitleInfo.tJob as 聘用职务,TitleInfo.tRemarks as [备注] ";
			s6 += "from TitleInfo,EmployInfo where TitleInfo.tiId=EmployInfo.tiId and EmployInfo.eId=" + n;
			DataTable dt6 = new DataTable();
			Base b6 = new Base();
			dt6 = b6.ExeSQLdt(s6);
			this.dataGrid6.DataSource = dt6.DefaultView;
			#endregion

			#region 绑定 休假记录 数据表
			string s7 = "select EmployInfo.eId as 员工编号,EmployInfo.eName as 员工姓名,HolidayInfo.hType as 休假类型,HolidayInfo.hReason as 批准人,HolidayInfo.hfDate as 开始时间,";
			s7 += "HolidayInfo.hlDate as 结束时间,HolidayInfo.hRemarks as [备注] ";
			s7 += "from EmployInfo,HolidayInfo where EmployInfo.hId=HolidayInfo.hId and EmployInfo.eId=" + n;
			DataTable dt7 = new DataTable();
			Base b7 = new Base();
			dt7 = b7.ExeSQLdt(s7);
			this.dataGrid7.DataSource = dt7.DefaultView;
			#endregion
		}
		#endregion

		#region  窗体关闭把empInfoForm的Enabled属性变为true
		private void MemberForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
		{
			empInfoForm.eif.Enabled = true;
		}
		#endregion

		#region  工具栏按钮
		private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
		{
			switch(e.Button.ToolTipText)
			{

⌨️ 快捷键说明

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