人事管理系统数据库源代码.doc

上传人:doc321 文档编号:12813449 上传时间:2021-12-06 格式:DOC 页数:6 大小:71.50KB
返回 下载 相关 举报
人事管理系统数据库源代码.doc_第1页
第1页 / 共6页
人事管理系统数据库源代码.doc_第2页
第2页 / 共6页
人事管理系统数据库源代码.doc_第3页
第3页 / 共6页
人事管理系统数据库源代码.doc_第4页
第4页 / 共6页
亲,该文档总共6页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《人事管理系统数据库源代码.doc》由会员分享,可在线阅读,更多相关《人事管理系统数据库源代码.doc(6页珍藏版)》请在三一文库上搜索。

1、using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;usingusingusingusingusingusingnamespace WebApplication1publicpartialclassWebForm1Pageprotectedvoid Page_Load( objectsender,EventArgs e)protectedvoid Button1_Click(objectsender,EventA

2、rgs e)Response.Redirect("/登录 .aspx" );protectedvoid Button2_Click(objectsender,EventArgs e)Response.Redirect("/人员信息查询 .aspx" );protectedvoid Button3_Click(objectsender,EventArgs e)Response.Redirect("/人员修改 .aspx" );protectedvoid Button4_Click(objectsender,EventArgs e)Res

3、ponse.Redirect("/部门信息 .aspx" );protectedvoid Button5_Click(objectsender,EventArgs e)Response.Redirect("/工资信息 .aspx" );using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;usingusingusingusingusingusingusingnamespace

4、 WebApplication1publicpartialclass部门信息PageprotectedvoidPage_Load( objectsender,EventArgse)protectedvoidButton1_Click(objectsender,EventArgse)bool find =false ;SqlConnectioncon= new SqlConnection( "server=localhost;Integrated Security=SSPI;database=人事管理系统" );con.Open();stringcmdstr= "s

5、elect * from部门表 " ;SqlDataAdapterda= new SqlDataAdapter (cmdstr,con);DataSet ds= new DataSet ();da.Fill(ds);for ( inti=0;i<ds.Tables0.Rows.Count;i+)for ( intj=0;j<ds.Tables0.Columns.Count;j+)Stringdata=(ds.Tables0.Rowsij.ToString().Trim();ifTextBox2.Text=ds.Tables0 .Rowsi TextBox3.Text=ds

6、.Tables0 .Rowsi" 部门代码 " .ToString();" 部门名称 " .ToString();find=true ;if(find =false)Response.Write("<script>window.alert('没有相关记录!')</script>");con.Close();protectedvoidButton2_Click(objectsender,EventArgs e)Response.Redirect("/Default.aspx")

7、;usingusingusingusingusingusingusingusingusingSystem;System.Collections;System.Configuration;System.Data;System.Linq;System.Web;usingusingusingusingusingnamespace WebApplication1publicpartialclass_DefaultPageprotectedvoidPage_Load( objectsender,EventArgse)protectedvoidTextBox1_TextChanged(objectsend

8、er,EventArgse)protectedvoidButton1_Click(objectsender,EventArgse)SqlConnectioncon =new SqlConnection( "server=localhost;Integrated Security=SSPI;database=人事管理系统" );stringstrCount;strCount ="select * from人事表 " ; con.Open();SqlCommandcom =new SqlCommand(strCount, con);SqlDataReader

9、 dr = com.ExecuteReader();stringstrUsername ="" , strPassword ="" ;while(dr.Read()if(TextBox1.Text = dr" 编号 " .ToString()|TextBox2.Text = dr" 用户密码" .ToString()strUsername = drstrPassword = dr" 编号 " .ToString();" 用户密码 " .ToString();break ;dr

10、.Close();con.Close();if(strUsername ="" )Response.Write("<script language=javascript>alert('登录成功!');</script>");return;protectedvoid Button2_Click(objectsender,EventArgs e)Response.Redirect("/Default.aspx");using System;using System.Collections;using

11、 System.Configuration;using System.Data;using System.Linq;using System.Web;usingusingusingusingusingusingusingnamespace WebApplication1publicpartialclass工资信息 Pageprotectedvoid Page_Load( objectsender,EventArgs e)protectedvoid TextBox2_TextChanged(objectsender,EventArgs e)protectedvoid TextBox5_TextC

12、hanged(objectsender,EventArgs e)protectedvoid Button1_Click(objectsender,EventArgs e)bool find =SqlConnectionfalse ;con =new SqlConnection ( "server=localhost;Integrated Security=SSPI;database=人事管理系统 " );con.Open();stringcmdstr ="select * from工资表 " ;SqlDataAdapterda =new SqlDataA

13、dapter(cmdstr, con);DataSet ds =new DataSet ();da.Fill(ds);for( inti = 0; i < ds.Tables0.Rows.Count; i+)for( intj = 0; j < ds.Tables0.Columns.Count; j+)Stringdata = (ds.Tables0.Rowsij.ToString().Trim();ifTextBox2.Text = ds.Tables0.RowsiTextBox3.Text = ds.Tables0.RowsiTextBox4.Text = ds.Tables0

14、.RowsiTextBox5.Text = ds.Tables0.Rowsifind =true ;" 应发工资 " .ToString();" 岗位津贴 " .ToString();" 奖励 " .ToString();" 保险 " .ToString();if(find =false )Response.Write("<script>window.alert('没有相关记录 !')</script>");con.Close();protectedvoi

15、d Button2_Click(objectsender,EventArgs e)Response.Redirect("/Default.aspx");using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;usingusingusingusingusingusingusingnamespace WebApplication1publicpartialclass人员信息Pageprotectedv

16、oidPage_Load( objectsender,EventArgse)protectedvoidButton1_Click(objectsender,EventArgse)Response.Redirect("/Default.aspx");protectedvoidButton2_Click(objectsender,EventArgse)bool find =false ;SqlConnectioncon =new SqlConnection( "server=localhost;Integrated Security=SSPI;database=人事管

17、理系统" );con.Open();stringcmdstr= "select * from工资表 " ;SqlDataAdapterda= new SqlDataAdapter(cmdstr,con);DataSet ds= new DataSet ();da.Fill(ds);for ( inti=0;i<ds.Tables0.Rows.Count;i+)for ( intj=0;j<ds.Tables0.Columns.Count;j+)Stringdata=(ds.Tables0.Rowsij.ToString().Trim();ifTextB

18、ox2.Text=ds.Tables0 .Rowsi TextBox3.Text=ds.Tables0 .Rowsi" 应发工资 " .ToString();" 岗位津贴 " .ToString();TextBox4.Text=ds.Tables0 .Rowsi TextBox5.Text = ds.Tables0.Rowsi" 奖励 " .ToString();" 保险 " .ToString();find=true ;if(find =false)Response.Write("<script&

19、gt;window.alert('没有相关记录!')</script>");con.Close();usingusingusingusingusingSystem;System.Collections;System.Configuration;System.Data;System.Linq;using System.Web;usingusingusingusingusingusingusingnamespace WebApplication1publicpartialclass人员修改 Pageprotectedvoid Page_Load( object

20、sender,EventArgs e)protectedvoid TextBox5_TextChanged(objectsender,EventArgs e)protectedvoid Button2_Click(objectsender,EventArgs e)SqlConnectioncon= new SqlConnection( "server=localhost;Integrated Security=SSPI;database=人事管理系统");con.Open();string insert= "insert into 人事表 ( 员工号,姓名,性别,

21、职称,学历 ) values(" +"""" +"," +"""" +",""," +"""" +"," +"""" +")" ;Response.Write(insert);SqlCommandcmd1=new SqlCommand(insert,con);con.Close();protectedvoid Button1_Click(objectsender,EventArgs e)Response.Redirect("/Default.aspx");protectedvoid GridView1_SelectedIndexChanged(objectsender,EventArgs e)

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 社会民生


经营许可证编号:宁ICP备18001539号-1