《2022年人事管理系统数据库源代码 .pdf》由会员分享,可在线阅读,更多相关《2022年人事管理系统数据库源代码 .pdf(8页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Li
2、nq; namespace WebApplication1 publicpartialclassWebForm1 : System.Web.UI.Page protectedvoid Page_Load( object sender, EventArgs e) protectedvoid Button1_Click(object sender, EventArgs e) Response.Redirect(/ 登录 .aspx ); protectedvoid Button2_Click(object sender, EventArgs e) Response.Redirect(/ 人员信息查
3、询 .aspx ); protectedvoid Button3_Click(object sender, EventArgs e) Response.Redirect(/ 人员修改 .aspx ); protectedvoid Button4_Click(object sender, EventArgs e) Response.Redirect(/ 部门信息 .aspx ); protectedvoid Button5_Click(object sender, EventArgs e) Response.Redirect(/ 工资信息 .aspx ); using System; using
4、 System.Collections; using System.Configuration; using System.Data; using System.Linq; 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 1 页,共 8 页 - - - - - - - - - using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using
5、 System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Data.SqlClient; namespace WebApplication1 publicpartialclass部门信息 : System.Web.UI.Page protectedvoid Page_Load( object sender, EventArgs e) protectedvoid Button1_Click(object sender, EventArgs e)
6、 bool find =false ; SqlConnection con= new SqlConnection ( server=localhost;Integrated Security=SSPI;database=人事管理系统 ); con.Open(); string cmdstr= select * from 部门表 ; SqlDataAdapter da= new SqlDataAdapter (cmdstr,con); DataSet ds= new DataSet (); da.Fill(ds); for ( int i=0;ids.Tables0.Rows.Count;i+)
7、 for ( int j=0;jds.Tables0.Columns.Count;j+) String data=(ds.Tables0.Rowsij.ToString().Trim(); if (data=TextBox1.Text.Trim() TextBox2.Text=ds.Tables0 .Rowsi部门代码 .ToString(); TextBox3.Text=ds.Tables0 .Rowsi部门名称 .ToString(); find=true ; if (find = false ) Response.Write(window.alert(没有相关记录 !); con.Clo
8、se(); protectedvoid Button2_Click(object sender, EventArgs e) Response.Redirect(/Default.aspx); 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 8 页 - - - - - - - - - using System; using System.Collections; using System.Configuration; using System.Data; using Sys
9、tem.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Data.SqlClient; using System.Data.SqlTypes; namespace WebApplication1 publicpar
10、tialclass_Default : System.Web.UI.Page protectedvoid Page_Load( object sender, EventArgs e) protectedvoid TextBox1_TextChanged(object sender, EventArgs e) protectedvoid Button1_Click(object sender, EventArgs e) SqlConnection con = new SqlConnection ( server=localhost;Integrated Security=SSPI;databas
11、e=人事管理系统 ); string strCount; strCount = select * from 人事表 ; con.Open(); SqlCommand com = new SqlCommand (strCount, con); SqlDataReader dr = com.ExecuteReader(); string strUsername = , strPassword = ; while (dr.Read() if (TextBox1.Text = dr编号 .ToString()|TextBox2.Text = dr用户密码.ToString() strUsername
12、= dr编号 .ToString(); strPassword = dr用户密码 .ToString(); 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 3 页,共 8 页 - - - - - - - - - break ; dr.Close(); con.Close(); if (strUsername = ) Response.Write(alert(登录成功! );); return ; protectedvoid Button2_Click(object sender, E
13、ventArgs e) Response.Redirect(/Default.aspx); using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.We
14、b.UI.WebControls.WebParts; using System.Xml.Linq; using System.Data.SqlClient; namespace WebApplication1 publicpartialclass工资信息 : System.Web.UI.Page protectedvoid Page_Load( object sender, EventArgs e) protectedvoid TextBox2_TextChanged(object sender, EventArgs e) protectedvoid TextBox5_TextChanged(
15、object sender, EventArgs e) 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 4 页,共 8 页 - - - - - - - - - protectedvoid Button1_Click(object sender, EventArgs e) bool find = false ; SqlConnection con = new SqlConnection ( server=localhost;Integrated Security=SSPI;databa
16、se=人事管理系统 ); con.Open(); string cmdstr = select * from 工资表 ; SqlDataAdapter da = new SqlDataAdapter (cmdstr, con); DataSet ds = new DataSet (); da.Fill(ds); for ( int i = 0; i ds.Tables0.Rows.Count; i+) for ( int j = 0; j ds.Tables0.Columns.Count; j+) String data = (ds.Tables0.Rowsij.ToString().Trim
17、(); if (data = TextBox1.Text.Trim() TextBox2.Text = ds.Tables0.Rowsi应发工资 .ToString(); TextBox3.Text = ds.Tables0.Rowsi岗位津贴 .ToString(); TextBox4.Text = ds.Tables0.Rowsi奖励 .ToString(); TextBox5.Text = ds.Tables0.Rowsi保险 .ToString(); find = true ; if (find = false ) Response.Write(window.alert(没有相关记录
18、!); con.Close(); protectedvoid Button2_Click(object sender, EventArgs e) Response.Redirect(/Default.aspx); using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 5 页,共 8
19、 页 - - - - - - - - - using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Data.SqlClient; namespace WebApplication1 publicpartialclass人员信息 : S
20、ystem.Web.UI.Page protectedvoid Page_Load( object sender, EventArgs e) protectedvoid Button1_Click(object sender, EventArgs e) Response.Redirect(/Default.aspx); protectedvoid Button2_Click(object sender, EventArgs e) bool find =false ; SqlConnection con = new SqlConnection ( server=localhost;Integra
21、ted Security=SSPI;database=人事管理系统 ); con.Open(); string cmdstr= select * from 工资表 ; SqlDataAdapter da= new SqlDataAdapter (cmdstr,con); DataSet ds= new DataSet (); da.Fill(ds); for ( int i=0;ids.Tables0.Rows.Count;i+) for ( int j=0;jds.Tables0.Columns.Count;j+) String data=(ds.Tables0.Rowsij.ToStrin
22、g().Trim(); if (data=TextBox1.Text.Trim() TextBox2.Text=ds.Tables0 .Rowsi应发工资 .ToString(); TextBox3.Text=ds.Tables0 .Rowsi岗位津贴 .ToString(); TextBox4.Text=ds.Tables0 .Rowsi奖励 .ToString(); TextBox5.Text = ds.Tables0.Rowsi保险 .ToString(); find=true ; if (find = false ) Response.Write(window.alert(没有相关记录
23、 !); con.Close(); 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 6 页,共 8 页 - - - - - - - - - using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; us
24、ing System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Data.SqlClient; namespace WebApplication1 publicpartialclass人员修改 : System.Web.UI.Page protectedvoid Page_Load( object sender, EventArgs e) protectedvoid Text
25、Box5_TextChanged(object sender, EventArgs e) protectedvoid Button2_Click(object sender, EventArgs e) SqlConnection con= new SqlConnection ( server=localhost;Integrated Security=SSPI;database=人事管理系统 ); con.Open(); stringinsert=insert into 人事表 (员工号,姓名,性别,职称,学历 ) values(+ + TextBox1.Text.Trim() + +, +
26、+ TextBox2.Text.Trim() + +, + TextBox3.Text.Trim() + , + + TextBox4.Text.Trim() + +, + +TextBox5.Text.Trim() + +) ; Response.Write(insert); SqlCommand cmd1=new SqlCommand (insert,con); con.Close(); protectedvoid Button1_Click(object sender, EventArgs e) Response.Redirect(/Default.aspx); protectedvoid GridView1_SelectedIndexChanged(object sender, EventArgs e) 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 7 页,共 8 页 - - - - - - - - - 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 8 页,共 8 页 - - - - - - - - -