您目前尚未登陆,请选择【登陆】或【注册
首页->行政办公->某公司人事工资管理系统源码>>QueryManage/QueryMemberPrint.aspx.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:某公司人事工资管理系统源码
当前文件:文件类型 StaffSalaryManage/QueryManage/QueryMemberPrint.aspx.cs打开代码结构图
普通视图
		            
1//文件名:QueryMemberPrint.aspx.cs 2using System; 3using System.Data; 4using System.Configuration; 5using System.Collections; 6using System.Web; 7using System.Web.Security; 8using System.Web.UI; 9using System.Web.UI.WebControls; 10using System.Web.UI.WebControls.WebParts; 11using System.Web.UI.HtmlControls; 12 13using System.Data.SqlClient; 14public partial class QueryManage_QueryMemberPrint : System.Web.UI.Page 15{ 16 protected void Page_Load(object sender, EventArgs e) 17 {//显示员工个人人事档案 18 string MyID = this.Request.Params["MyID"].ToString(); 19 if (Session["MyCompanyName"] != null) 20 { 21 this.Label1.Text = Session["MyCompanyName"].ToString() + "员工人事档案卡"; 22 } 23 this.Label2.Text = "打印日期:" + DateTime.Now.ToShortDateString(); 24 string MyConnectionString = ConfigurationManager.ConnectionStrings["MyPersonnelDBConnectionString"].ConnectionString; ; 25 string MySQL = "Select * From 基本档案 WHERE 员工编号 LIKE '" + MyID + "'"; 26 SqlDataAdapter MyAdapter = new SqlDataAdapter(MySQL, MyConnectionString); 27 DataTable MyTable = new DataTable(); 28 MyAdapter.Fill(MyTable); 29 this.Label3.Text = "员工编号:" + MyID; 30 this.Label4.Text = "部门:" + MyTable.Rows[0][2].ToString(); 31 this.Label5.Text = "姓名:" + MyTable.Rows[0][3].ToString(); 32 this.Label6.Text = "性别:" + MyTable.Rows[0][4].ToString(); 33 this.Label7.Text = "民族:" + MyTable.Rows[0][5].ToString(); 34 this.Label8.Text = "籍贯:" + MyTable.Rows[0][6].ToString(); 35 this.Label9.Text = "出生日期:" + MyTable.Rows[0][7].ToString().TrimEnd(new char[2] { ':', '0' }); 36 this.Label10.Text = "身份证号码:" + MyTable.Rows[0][8].ToString(); 37 this.Label11.Text = "政治面貌:" + MyTable.Rows[0][9].ToString(); 38 this.Label12.Text = "婚姻状况:" + MyTable.Rows[0][10].ToString(); 39 this.Label13.Text = "文化程度:" + MyTable.Rows[0][11].ToString(); 40 this.Label14.Text = "职称:" + MyTable.Rows[0][12].ToString(); 41 this.Label15.Text = "职务:" + MyTable.Rows[0][13].ToString(); 42 this.Label16.Text = "专业:" + MyTable.Rows[0][14].ToString(); 43 this.Label17.Text = "毕业院校:" + MyTable.Rows[0][15].ToString(); 44 this.Label18.Text = "进入公司时间:" + MyTable.Rows[0][16].ToString().TrimEnd(new char[2] { ':', '0' }); 45 this.Label19.Text = "合同服务年限:" + MyTable.Rows[0][17].ToString(); 46 this.Label20.Text = "基本工资:" + MyTable.Rows[0][18].ToString(); 47 this.Label21.Text = "银行账号:" + MyTable.Rows[0][19].ToString(); 48 this.Label22.Text = "养老保险账号:" + MyTable.Rows[0][20].ToString(); 49 this.Label23.Text = "医疗保险账号:" + MyTable.Rows[0][21].ToString(); 50 this.Label24.Text = "住房基金账号:" + MyTable.Rows[0][22].ToString(); 51 this.Label25.Text = "联系电话:" + MyTable.Rows[0][23].ToString(); 52 this.Label26.Text = "手机号码:" + MyTable.Rows[0][24].ToString(); 53 this.Label27.Text = "电子信箱:" + MyTable.Rows[0][25].ToString(); 54 this.Label28.Text = "家庭地址:" + MyTable.Rows[0][26].ToString(); 55 this.Label29.Text = "邮政编码:" + MyTable.Rows[0][27].ToString(); 56 this.Label30.Text = "补充说明:" + MyTable.Rows[0][28].ToString(); 57 MySQL = "Select 家庭成员姓名,与员工关系,工作单位,担任职务,联系电话 From 家庭成员 WHERE 员工编号 LIKE '" + MyID + "'"; 58 MyAdapter = new SqlDataAdapter(MySQL, MyConnectionString); 59 MyTable = new DataTable(); 60 MyAdapter.Fill(MyTable); 61 this.GridView1.DataSource = MyTable; 62 this.GridView1.DataBind(); 63 MySQL = "Select 开始日期,结束日期,单位名称,所在部门,担任职务 From 工作简历 WHERE 员工编号 LIKE '" + MyID + "'"; 64 MyAdapter = new SqlDataAdapter(MySQL, MyConnectionString); 65 MyTable = new DataTable(); 66 MyAdapter.Fill(MyTable); 67 this.GridView2.DataSource = MyTable; 68 this.GridView2.DataBind(); 69 MySQL = "Select 开始日期,培训单位,培训地点,培训内容 From 培训记录 WHERE 员工编号 LIKE '" + MyID + "'"; 70 MyAdapter = new SqlDataAdapter(MySQL, MyConnectionString); 71 MyTable = new DataTable(); 72 MyAdapter.Fill(MyTable); 73 this.GridView3.DataSource = MyTable; 74 this.GridView3.DataBind(); 75 MySQL = "Select 奖惩日期,奖惩类型,奖惩原因,奖惩批准单位 From 奖惩记录 WHERE 员工编号 LIKE '" + MyID + "'"; 76 MyAdapter = new SqlDataAdapter(MySQL, MyConnectionString); 77 MyTable = new DataTable(); 78 MyAdapter.Fill(MyTable); 79 this.GridView4.DataSource = MyTable; 80 this.GridView4.DataBind(); 81 MySQL = "Select 专长描述,工作业绩,补充说明 From 工作业绩 WHERE 员工编号 LIKE '" + MyID + "'"; 82 MyAdapter = new SqlDataAdapter(MySQL, MyConnectionString); 83 MyTable = new DataTable(); 84 MyAdapter.Fill(MyTable); 85 this.GridView5.DataSource = MyTable; 86 this.GridView5.DataBind(); 87 if (Session["MyUserName"] != null) 88 { 89 this.Label31.Text = "人事专员:"+Session["MyUserName"].ToString(); 90 } 91 } 92 } 93
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:某公司人事工资管理系统源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号