公司人事管理系统代码和文档

合集下载

asp 课程设计源代码-人事管理系统

asp 课程设计源代码-人事管理系统

附录:源程序代码1).default.aspx<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default2" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="/1999/xhtml"><head id="Head1" runat="server"><title>无标题页</title><style type="text/css">#form1{height: 213px;}.style2{width: 100%;height: 211px;}.style6{width: 99px;}.style3{text-align: center;}</style></head><body bgcolor="#ccffcc"><form id="form1" runat="server"><table class="style2"><tr><td class="style4" colspan="2"><span class="Apple-style-span"style="color: rgb(0, 0, 0); font-family: 楷体_GB2312; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: center; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust:auto; -webkit-text-stroke-width: 0px; ">人事信息管理系统</span></td><td rowspan="5"><img alt="" src="images/4ce6a7a5e39e3e49156444f3e340dc21.jpg"style="width: 853px; height: 193px" />&nbsp;</td></tr><tr><td class="style6">用户名:</td><td class="style3"><asp:TextBox ID="TextBox1" runat="server" Height="22px" Width="128px"></asp:TextBox></td></tr><tr><td class="style6">用户密码:</td><td class="style3"><asp:TextBox ID="TextBox2" runat="server" Height="22px" TextMode="Password"Width="128px"></asp:TextBox></td></tr><tr><td class="style5" colspan="2"><asp:CheckBox ID="CheckBox1" runat="server" Text="记住用户" /> </td></tr><tr><td class="style3" colspan="2"><asp:Button ID="Button1" runat="server" Height="31px" onclick="Button1_Click"style="text-align: center" Text="登录" Width="50px" /></td></tr></table></form></body></html>2)Default.aspx.csusing 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.Linq;using System.Data.OleDb;public partial class Default2 : System.Web.UI.Page{protected void Page_Load(object sender, EventArgs e){this.Title = "学生信息管理系统-----登录";}protected void Button1_Click(object sender, EventArgs e){OleDbConnection conn = new OleDbConnection();string Id = TextBox1.Text;conn.ConnectionString = "provider=Microsoft.Jet.OleDb.4.0;" + "Data Source=" + Server.MapPath("App_Data/student.mdb");string StrSel = "Select * from message where id='" + TextBox1.Text + "'and pwd='" + TextBox2.Text + "'";conn.Open();OleDbCommand com = new OleDbCommand(StrSel, conn);OleDbDataReader dr = com.ExecuteReader();dr.Read();if (dr.HasRows){Session["pass"] = TextBox1.Text;Server.Transfer("glxt.aspx");Response.Redirect("glxt.aspx");}else{Response.Redirect("Default.aspx");}conn.Close();}}3)Glxt.aspx<%@ Page Language="C#" AutoEventWireup="true" CodeFile="glxt.aspx.cs" Inherits="glxt" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="/1999/xhtml"><head id="Head1" runat="server"><title>无标题页</title><style type="text/css">body {margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;background-color:#CCFFCC;}.STYLE1 {font-size: 12px;color: #FFFFFF;}.STYLE3 {font-size: 12px;color: #033d61;text-decoration:none;background-image:login_2.jpg;}#left{float:left;width:177px;}.STYLE4{float:left;clear:right;width:804px;background-image:content_1.jpg;height: 1032px;}.style2{width: 788px;height: 23px;}.style3{width: 817px;}.style4{height: 26px;}.style5{height: 91px;}p.p0{margin:0pt;margin-bottom:0.0001pt;margin-bottom:0pt;margin-top:0pt;text-align:justify;font-size:10.5000pt; font-family:'Times New Roman'; }.style6{width: 285px;height: 43px;}.style7{width: 100px;height: 43px;}.style9{width: 6px;}#form1{height: 307px;width: 1321px;}.style10{height: 43px;}</style></head><body bgcolor="White" ><form id="form1" runat="server"><div><table border="0" cellpadding="0" cellspacing="0"style="height: 303px; width: 130px"><tr><td height="70"><table bgcolor="#CCFFCC" border="0" cellpadding="0" cellspacing="0"width="100%"><tr><td bgcolor="White" class="style5"><table border="0" cellpadding="0" cellspacing="0"style="height: 265px; width: 1141px;"><tr><td bgcolor="White" style="width: 291px" width="270"><img alt="" src="images/6b5f60fc09e584574192f873acda8d85.jpg"style="width: 1392px; height: 252px; margin-top: 0px;" /><span class="STYLE3"><tableborder="0" cellpadding="0" cellspacing="0"style="height: 47px; width: 1389px;"><trbgcolor="#CCFFCC"><td class="style6" bgcolor="#CCFFCC"><spanclass="STYLE3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="Label2" runat="server"></asp:Label><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="Label1" runat="server"></asp:Label></span></td><td class="style7" bgcolor="#CCFFCC"><spanclass="STYLE3"><asp:LinkButton ID="LinkButton6" runat="server" onclick="LinkButton6_Click"Font-Size="Large" Height="26px" Width="93px"><spanclass="style3">公司简介</span></spanclass="style3"></asp:LinkButton></span></td><tdclass="style10"><asp:LinkButton ID="LinkButton7" runat="server" onclick="LinkButton7_Click"Font-Size="Large" Height="26px" Width="72px"><spanclass="style3">信息查询</span></spanclass="style3"></asp:LinkButton><asp:LinkButton ID="LinkButton18" runat="server" onclick="LinkButton18_Click"Font-Size="Large" Height="26px" Width="80px"><spanclass="style3">信息修改</spanclass="style3"></asp:LinkButton><asp:LinkButton ID="LinkButton20" runat="server" Font-Size="Large"Height="26px" PostBackUrl="add.aspx" Width="80px" onclick="LinkButton20_Click">添加信息</asp:LinkButton><asp:LinkButton ID="LinkButton17" runat="server" onclick="LinkButton17_Click"Font-Size="Medium" Height="26px" Width="100px" style="margin-left: 108px">密码修改</asp:LinkButton>&nbsp;&nbsp;&nbsp;&nbsp;<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Default.aspx"Font-Size="Medium" Height="26px" Width="91px">退出</asp:HyperLink></td></tr></table></span></td></tr></table></td></tr><tr><td height="8" style="line-height: 8px;">&nbsp;</td></tr></table></td></tr></table></div><div id="left"><table border="0" cellpadding="0" cellspacing="0" height="100%" width="165"> <tr><td height="28"><table border="0" cellpadding="0" cellspacing="0" width="100%"bgcolor="#CCFFCC"><tr><td width="19%"><spanclass="STYLE3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /><br /></span></td></tr></table></td></tr><tr><td valign="top"><table align="center" bgcolor="White" border="0" cellpadding="0"cellspacing="0" width="151"><tr><td><table border="0" cellpadding="0" cellspacing="0"style="width: 118%; height: 379px"><tr><td height="23" bgcolor="#CCFFCC"><table border="0" cellpadding="0" cellspacing="0" width="100%"bgcolor="#CCFFCC"><tr><td class="style9">&nbsp;</td><td class="STYLE3" width="82%"><tablealign="center" border="0" cellpadding="0" cellspacing="0"width="90%"style="height: 217px" bgcolor="#CCFFCC"><tr><td height="25"><div align="center"></div></td><td height="23" width="84%"><table border="0" cellpadding="0" cellspacing="0" style="width: 95%"><tr><td height="20">&nbsp;</td></tr></table></td></tr><tr><td height="23"><div align="center"></div></td><td height="23"><table border="0" cellpadding="0" cellspacing="0"style="height: 40px; width: 122%"><tr><td height="20">&nbsp;</td></tr></table></td></tr><tr><td height="23"><div align="center"></div></td><td height="23"><table border="0" cellpadding="0" cellspacing="0" width="95%"><tr><td height="20">&nbsp;</td></tr></table></td></tr><tr><td height="23"><div align="center"></div></td><td height="23"><table border="0" cellpadding="0" cellspacing="0" width="95%"><tr><td height="20"></span></td></tr></table></td></tr></table><br /><br /><br /><br /><br /><br /><br /><br /></td></tr></table></td></tr><tr><td id="submenu1" bgcolor="#CCFFCC"><div class="sec_menu"></div></td></tr></table></td></tr><tr><td><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td height="23" bgcolor="#CCFFCC"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td width="18%">&nbsp;</td><td class="STYLE1" width="82%"><div align="center" style="width: 149px"></div></td></tr></table></td></tr><tr><td id="submenu2" bgcolor="#CCFFCC"><div></div></td></tr></table></td></tr><tr><td><table border="0" cellpadding="0" cellspacing="0" style="width: 118%"><tr><td height="23" bgcolor="#CCFFCC"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td width="18%">&nbsp;</td><td class="STYLE1" width="82%">&nbsp;</td></tr></table></td></tr><tr><td bgcolor="#CCFFCC"><div><asp:Panel ID="Panel3" runat="server"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td><tablealign="center" border="0" cellpadding="0" cellspacing="0" width="90%"><tr><td height="25" style="width: 100%" width="16%"><div align="center"></div><table border="0" cellpadding="0" cellspacing="0" width="95%"><tr><td height="20">&nbsp;</td></tr></table></td></tr></table></td></tr></table></asp:Panel></div></td></tr><tr><td class="style4" bgcolor="#CCFFCC"></td></tr><tr><td bgcolor="#CCFFCC"><div><table border="0" cellpadding="0" cellspacing="0" style="width: 100%"><tr><asp:Panel ID="Panel4" runat="server"><td><tablealign="center" border="0" cellpadding="0" cellspacing="0" width="90%"><tr><td height="25" width="16%"><div align="center"></div></td><td height="23" width="84%"><table border="0" cellpadding="0" cellspacing="0" width="95%"><tr><td height="20"><asp:LinkButton ID="LinkButton15" runat="server"><span class="STYLE3"></span></asp:LinkButton></td></tr></table></td></tr><tr><td height="23"><div align="center"></div></td><td height="23"><table border="0" cellpadding="0" cellspacing="0" width="95%"><tr><td height="20"><asp:LinkButton ID="LinkButton16" runat="server"><span class="STYLE3">登录记录</span></asp:LinkButton></td></tr></table></td></tr></table></td></asp:Panel></tr><tr><td height="5">&nbsp;</td></tr></table></div></td></tr></table></td></tr></table></td></tr></table></div><div class="STYLE4"><asp:Panel ID="Panel5" runat="server" BackColor="#CCFFCC"><table bgcolor="Gray"><tr><td bgcolor="White" class="style3"><table><tr><td bgcolor="White" class="style2"><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'Times New Roman'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xx<font face="宋体">商贸有限公司是国家外经贸局,海关总署批注的有进出口权的公司,公司有雄厚的经济基础,强大的关系网络,完备的技术和人员配置,随着我国加入</font><fontface="Times New Roman">WTO</font><font face="宋体">,进出口贸易的日益增长,为了进一步满足贸易商、进出口商的需求,我公司为商家精心打造了门到门的一站式服务。

人力资源管理系统源代码

人力资源管理系统源代码

1)登陆窗体代码设计窗体代码主要实现了连接数据库的功能,这里用于连接用户信息表.其程序如下:Private Sub Form_Load()Dim i As IntegerIf App。

PrevInstance ThenMsgBox (”程序已经运行,不能再次装载。

"), vbExclamationUnload MeEnd If'本段代码用于判定本程序是否已经装载于内存中,以避免程序的多重启动i = 0Open App.Path + ”\user。

ini” For Input As #1Do While Not EOF(1)Input #1, user(i), pws(i),state(i), Emplo(i)If state(i)= ”A” ThenCombo1。

AddItem user(i)End Ifi = i + 1Loop Close #1Combo1.ListIndex = 1'在窗口装载阶段读取用户设置文件获取用户信息并装载于用户列表框中End Sub(2)“取消”按钮是退出登录界面,退出系统的.其代码如下:Private Sub CmdCancel_Click()Unload MeEndEnd Sub(3)“确定”按钮代码设计“确定”按钮代码主要实现了用户登陆时,用户名和密码的认证,当用户名或密码错误时,系统提示错误。

其程序如下:Private Sub cmdOK_Click()If txtPassword = pws(Combo1.ListIndex)ThenCurId = Combo1.ListIndexEmploID = Emplo(CurId)CurUser = user(CurId)CurPsw = pws(CurId)Me.Hide’Load FrmMainFrmMain。

ShowElse MsgBox ”Invalid Password, try again!", , ”Login”txtPassword.SetFocusSendKeys "{Home}+{End}"End If End Sub(1)窗体选择的单击事件代码设计窗体选择的单击事件代码主要实现了进入本系统所有模块的功能,这里有以下几个模块,它们分别是员工信息模块,假条信息模块,工资管理模块,用户设置模块等/其程序如下:Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)Select Case Button。

企业人事管理系统开发文档

企业人事管理系统开发文档

目录1 需求分析 (1)1.1系统总体介绍 (1)1.2系统功能分析错误!未找到索引项。

(1)2 概念结构设计 (1)2.1需求分析的设计思想 (1)2.2.1数据流图和数据字典 (2)1.1.1 2.2.1.1 数据流图 (2)2.2.1.2 数据字典 (3)2.2概念结构设计 (3)2.2.1 局部概念模型设计 (3)2.2.2 总体概要设计 (4)2.3CDM模型的生成过程 (4)3 逻辑结构设计 (6)3.1E-R图向关系模型的转换 (6)3.2PDM模型的生成过程 (8)3.3数据库设计 (8)结论 (13)致谢 (14)参考文献: (14)1 需求分析1.1系统总体介绍本系统主要是为了帮助企业的人事部门和财务主管部门提高工作效率,减少企业的不必要开销,从企业的根本利益出发,实现企业人事信息管理的系统化、规范化和自动化。

该课题是对学生数据库原理与应用、软件工程、Powerdesigner等多门学科知识的综合运用,是提高学生实际动手能力的有效方法。

本课题模拟实际项目开发过程,使学生熟悉管理系统开发的方法和重要步骤,提高学生的数据库设计及系统分析能力,使学生积累一定的实战经验。

1.2系统功能分析结合对企业对人事的管理,我们设计了企业人事管理系统,这个系统最终实现的主要功能如下:员工基本信息部分:主要完成对员工基本信息的添加、修改、删除、查询等管理。

员工档案信息部分:主要完成员工档案信息的添加、修改、删除、查询等管理。

员工部门信息部分:主要完成员工所属部门的添加、修改、删除、查询等管理。

员工工资信息部分:主要完成员工工资信息的添加、修改、删除、查询等管理。

员工保险信息部分:主要完成员工保障信息的添加、修改、删除、查询等管理。

2 概念结构设计随着计算机技术的迅猛发展,企业与员工的联系变的越来越紧密,为了方便管理企业,我们开发此系统主要是满足日益增长的人员流动和变向的市场需求,利于企业的发展和人事部门的管理。

人力资源管理系统代码 ASP

人力资源管理系统代码 ASP

<!--#include file=DataBase/conn.asp--><%If request("action")="login" thenadmin_name=request("admin_name")'获取用户名admin_pass=request("admin_pass")'获取密码username=trim(request("admin_name"))password=trim(request("admin_pass"))for i=1 to len(username)user=mid(username,i,1)if user="'" or user="%" or user="<" or user=">" or user="&" or user="|" thenresponse.write "<script language=JavaScript>" & "alert('您的用户名含有非法字符,请重新输入!');" & "history.back()" & "</script>"response.endend ifnextfor i=1 to len(password)pass=mid(password,i,1)if pass="'" or pass="%" or pass="<" or pass=">" or upass="&" or pass="|" then response.write "<script language=JavaScript>" & "alert('您的密码含有非法字符,请重新输入!');" & "history.back()" & "</script>"response.endend ifnextset rs=server.CreateObject("adodb.recordset")sql="select * from tb_User where username='"&admin_name&"'and userpwd='"&admin_pass&"' "rs.open sql,conn,1,1if rs.eof then response.write "<br><br><br><br><font size=2><center>对不起,您输入的用户名或密码,请重新输入,谢谢!<a href=login.asp>返回</a></font>"else session("admin_name")=request("admin_name") response.Redirect("index.asp")'跳转到管理首页end ifrs.closeset rs=nothingconn.closeset conn=nothingend if%>6 首页设计网站首页主要由两部部分组成,一部分是管理导航区,另一部分是展示区。

人事管理系统毕业设计(设计与代码实现)

人事管理系统毕业设计(设计与代码实现)

摘要随着计算机技术的飞速发展,计算机在企业管理中应用的普及,利用计算机实现企业人事管理势在必行。

本系统结合公司实际的人事管理制度,经过实际的需求分析,采用功能强大的Visual Basic6.0作为开发工具而开发出来的单机版人事管理系统。

整个系统从符合操作简便、界面友好、灵活、实用、安全的要求出发,完成人事管理的全过程,包括新进员工加入时人事档案的建立、老员工的转出、职位等的变动引起职工信息的修改、员工信息查询、统计等人事管理工作以及新进员的新增、老员工修改等管理工作。

经过实际使用证明,本文所设计的人事管理系统可以满足公司人事管理方面的需要。

关键词:VB、数据库、窗体、测试、目录第一章概述 (4)1.1、本课题的来源 (4)1.2、本论文的目的、内容及作者主要贡献 (4)第二章开好发工具的选择 (4)第三章系统调研及可行性分析 (7)3.1、系统调研 (7)3.2、可靠性分析概述 (8)3.3、技术可行性分析 (8)第四章系统分析 (9)4.1、系统需求分析 (9)4.2、数据流程图 (10)第五章系统总体设计 (10)5.1、功能描述 (10)5.2、系统操作流程图 (11)第六章系统详细设计 (12)6.1、数据库设计 (12)6.2、系统主要界面 (13)第七章系统测试 (16)7.1、测试举例 (16)7.2、测试项目 (17)7.3、测试方法 (18)致谢 (19)参考文献 (20)附件:源程序…………………………………………………………………………21第一章概述1、本课题的来源随着计算机技术的飞速发展,计算机在企业管理中应用的普及,利用计算机实现企业人事管理势在必行。

对于大中型企业来说,利用计算机支持企业高效率完成劳动人事管理的日常事务,是适应现代企业制度要求、推动企业劳动人事管理走向科学化、规范化的必要条件;计算机管理所无法比拟的优点检索迅速、查找方便、可靠性高、存储量大、保密性好、寿命长、成本低等。

企业人事管理系统人事考勤管理后台代码

企业人事管理系统人事考勤管理后台代码

企业人事管理系统人事考勤管理后台代码一、企业人事管理系统的背景和重要性随着企业规模的不断扩大,人事管理工作的复杂性也在不断提高。

为了提高管理水平、降低管理成本,企业急需一套高效、便捷的人事管理系统。

企业人事管理系统集成了众多功能模块,其中人事考勤管理模块是核心部分。

本文将重点介绍企业人事管理系统中人事考勤管理后台代码的编写方法和技巧。

二、人事考勤管理模块的功能和作用1.考勤数据采集:通过各种设备(如考勤机、指纹识别等)收集员工的考勤数据,包括出勤、迟到、早退、请假等。

2.考勤数据统计:对采集到的考勤数据进行整理、统计,生成各种考勤报表。

3.考勤异常处理:对考勤数据中的异常情况进行处理,如请假、调休等。

4.考勤数据分析:对考勤数据进行分析,为人力资源管理提供决策依据。

5.考勤数据查询:提供方便快捷的考勤数据查询功能,便于管理人员查看。

三、后台代码的编写方法和技巧1.技术选型:根据项目需求,选择合适的开发语言、框架和数据库。

例如,可以使用Java、Python、.NET等编程语言,搭配Spring、Django、等框架,使用MySQL、Oracle等数据库。

2.模块划分:将人事考勤管理功能划分为多个模块,如考勤数据采集、数据统计、异常处理等,便于代码的组织和维护。

3.代码规范:遵循编程规范,确保代码的可读性和可维护性。

4.数据库设计:合理设计数据表结构,满足系统需求。

例如,可以设计员工信息表、考勤记录表、考勤报表表等。

5.接口设计:设计清晰、易用的API接口,方便前端调用。

四、代码实现的步骤和流程1.员工信息管理:包括员工的增加、修改、删除和查询等功能。

2.考勤数据采集:对接考勤设备,实时采集考勤数据。

3.考勤数据处理:对采集到的考勤数据进行清洗、去重、合并等处理。

4.考勤数据统计:根据处理后的数据,计算员工的出勤情况、迟到早退等指标。

5.考勤报表生成:根据统计结果,生成各类考勤报表。

6.考勤数据查询:提供多种查询条件,方便管理人员查看考勤数据。

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

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

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.Linq;namespace WebApplication1{publicpartialclass WebForm1 : 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("~/人员信息查询.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 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.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){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;i<ds.Tables[0].Rows.Count;i++){for(int j=0;j<ds.Tables[0].Columns.Count;j++){String data=(ds.Tables[0].Rows[i][j].ToString()).Trim();if(data==TextBox1.Text.Trim()){TextBox2.Text=ds.Tables[0] .Rows[i]["部门代码"].ToString();TextBox3.Text=ds.Tables[0] .Rows[i]["部门名称"].ToString();find=true;}}}if (find == false){Response.Write("<script>window.alert('没有相关记录!')</script>");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;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{publicpartialclass_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;database=人事管理系统"); string strCount;strCount = "select * from 人事表"; con.Open();Sqlmand= new Sqlmand(strCount, con);SqlDataReader dr = .ExecuteReader();string strUsername = "", strPassword = "";while (dr.Read()){if (TextBox1.Text == dr["编号"].ToString()||TextBox2.Text == dr["用户密码"].ToString()){strUsername = dr["编号"].ToString();strPassword = dr["用户密码"].ToString();break;}}dr.Close();con.Close();if (strUsername == ""){Response.Write("<script language=javascript>alert('登录成功!');</script>");return;}}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;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工资信息: System.Web.UI.Page{protectedvoid Page_Load(object sender, EventArgs e){}protectedvoid TextBox2_TextChanged(object sender, EventArgs e){}protectedvoid TextBox5_TextChanged(object sender, EventArgs e){}protectedvoid Button1_Click(object sender, EventArgs e){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; i < ds.Tables[0].Rows.Count; i++){for (int j = 0; j < ds.Tables[0].Columns.Count; j++){String data = (ds.Tables[0].Rows[i][j].ToString()).Trim();if (data == TextBox1.Text.Trim()){TextBox2.Text = ds.Tables[0].Rows[i]["应发工资"].ToString();TextBox3.Text = ds.Tables[0].Rows[i]["岗位津贴"].ToString();TextBox4.Text = ds.Tables[0].Rows[i]["奖励"].ToString();TextBox5.Text = ds.Tables[0].Rows[i]["保险"].ToString();find = true;}}}if (find == false){Response.Write("<script>window.alert('没有相关记录!')</script>");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;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人员信息: System.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;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;i<ds.Tables[0].Rows.Count;i++){for(int j=0;j<ds.Tables[0].Columns.Count;j++){String data=(ds.Tables[0].Rows[i][j].ToString()).Trim();if(data==TextBox1.Text.Trim()){TextBox2.Text=ds.Tables[0] .Rows[i]["应发工资"].ToString();TextBox3.Text=ds.Tables[0] .Rows[i]["岗位津贴"].ToString();TextBox4.Text=ds.Tables[0] .Rows[i]["奖励"].ToString();TextBox5.Text = ds.Tables[0].Rows[i]["保险"].ToString();find=true;}}}if (find == false){Response.Write("<script>window.alert('没有相关记录!')</script>");con.Close();}}}}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.Linq;using System.Data.SqlClient;namespace WebApplication1{publicpartialclass人员修改: System.Web.UI.Page{protectedvoid Page_Load(object sender, EventArgs e){}protectedvoid TextBox5_TextChanged(object sender, EventArgs e){}protectedvoid Button2_Click(object sender, EventArgs e){SqlConnection con=new SqlConnection("server=localhost;Integrated Security=SSPI;database=人事管理系统");con.Open();string insert="insert into 人事表(员工号,XX,性别,职称,学历) values("+""+ TextBox1.Text.Trim() +""+","+"" + TextBox2.Text.Trim() +""+","+ TextBox3.Text.Trim() + "," +""+ TextBox4.Text.Trim() +""+","+""+TextBox5.Text.Trim() + ""+")";Response.Write(insert);Sqlmand cmd1=new Sqlmand(insert,con);con.Close();}protectedvoid Button1_Click(object sender, EventArgs e){Response.Redirect("~/Default.aspx");}protectedvoid GridView1_SelectedIndexChanged(object sender, EventArgs e){}}}。

企业人事管理系统java源代码

企业人事管理系统java源代码

企业⼈事管理系统java源代码import java.awt.* ;import java.awt.event.*;import java.sql.*;import java.util.*;import javax.swing.*;import javax.swing.border.*;public class A extends JFrame{protected JPanel p = new JPanel();protected JPanel p1 = new JPanel();protected JPanel p2 = new JPanel();protected JPanel p3= new JPanel();JMenuBar M =new JMenuBar();JMenu m1 = new JMenu("基本信息模块");JMenu m2 = new JMenu("考勤考评信息模块");JMenu m3 = new JMenu("系统维护信息模块");JMenuItem mm1 = new JMenuItem("员⼯基本信息"); JMenuItem mm2 = new JMenuItem("员⼯家庭成员基本信息"); JMenuItem mm3 = new JMenuItem("员⼯培训信息"); JMenuItem mm4 = new JMenuItem("员⼯考勤信息"); JMenuItem mm5 = new JMenuItem("员⼯考评信息"); JMenuItem mm6 = new JMenuItem("普通管理员"); JMenuItem mm7 = new JMenuItem("⾼级管理员"); JMenuItem mm8 = new JMenuItem("退出");protected JLabel l1 = new JLabel("员⼯编号:");protected JLabel l2 = new JLabel("姓名:");protected JLabel l3 = new JLabel("性别:");protected JLabel l4 = new JLabel("年龄:");protected JLabel l5 = new JLabel("部门:");protected JTextField t1 = new JTextField(10);protected JTextField t2 = new JTextField(10);protected JTextField t3 = new JTextField(10);protected JTextField t4 = new JTextField(10);protected JTextField t5 = new JTextField(10);private JButton b1 = new JButton("查询");private JButton b2 = new JButton("插⼊");private JButton b3 = new JButton("修改");private JButton b4 = new JButton("删除");private JButton b5 = new JButton("清除");private JButton b6 = new JButton("下⼀条");private Connection c; // @jve:decl-index=0:private Statement s; // @jve:decl-index=0:private ResultSet r; // @jve:decl-index=0:{super("⼈事管理系统");getContentPane().add(p);setJMenuBar(M);M.add(m1);M.add(m2);M.add(m3);m1.add(mm1);m1.add(mm2);m1.add(mm3);m1.addSeparator();m1.add(mm8);m2.add(mm4);m2.add(mm5);m3.add(mm6);m3.add(mm7);p.add(p1,BorderLayout.NORTH);p.add(p2,BorderLayout.CENTER);p.add(p3,BorderLayout.SOUTH);p1.setLayout(new GridLayout(5,2,1,3));p1.add(l1);p1.add(t1);p1.add(l2);p1.add(t2);p1.add(l3);p1.add(t3);p1.add(l4);p1.add(t4);p1.add(l5);p1.add(t5);p2.add(b1);p1.add(b2);p2.add(b3);p1.add(b4);p2.add(b5);p3.add(b6);t1.setText("");t2.setText("");t3.setText("");t4.setText("");t5.setText("");setSize(350,300);setVisible(true);try{Class.forName("sun.jdbc.odbc.JdbcOdbcDrive");c=DriverManager.getConnection("jdbc:odbc:sd","sa",null);s=c.createStatement();r=s.executeQuery("select * from 员⼯基本信息表");}catch (SQLException e){JOptionPane.showMessageDialog(null ,e.getMessage(),"操作错误!",JOptionPane.ERROR_MESSAGE); System.exit(1);}catch(ClassNotFoundException e)JOptionPane.showMessageDialog(null ,e.getMessage(),"驱动程序找不到!",JOptionPane.ERROR_MESSAGE); System.exit(1);}addWindowListener( new WindowAdapter(){public void windowClosing(WindowEvent event){try {s.close();c.close();catch(SQLException e){JOptionPane.showMessageDialog(null,e.getMessage(),"不能关闭!",JOptionPane.ERROR_MESSAGE); System.exit(1);}}});b1.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent event){try{r=s.executeQuery("select * from 员⼯基本信息表" + "where 员⼯编号='"+t1.getText()+"'");if(r.next()){t1.setText(r.getString(1));t2.setText(r.getString(2));t3.setText(r.getString(3));t4.setText(r.getString(4));t5.setText(r.getString(5));JOptionPane.showMessageDialog(null,"查询成功!","查询操作",JOptionPane.ERROR_MESSAGE);}else{t2.setText("");t3.setText("");t4.setText("");t5.setText("");JOptionPane.showMessageDialog(null,"查询失败!","查询操作",JOptionPane.ERROR_MESSAGE);}catch(NumberFormatException e){System.out.println(e);}catch(SQLException e){System.out.println(e);}});b2.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent event){String v1,v2,v3,v4,v5;v1=t1.getText();v2=t2.getText();v3=t3.getText();v4=t4.getText();v5=t5.getText();if((!v1.equals( "" ))&&(!v2.equals(""))&&(!v3.equals(""))&&(!v4.equals(""))&&(!v5.equals (""))){try{int n1 = Integer.parseInt(v4);int r1 = s.executeUpdate("INSERT INTO 员⼯基本信息表"+ "values('"+v1+"','"+v2+"','"+v3+"',"+n1+",'"+v5+"')"); if(r1!=0){t1.setText("");t2.setText("");t3.setText("");t4.setText("");t5.setText("");JOptionPane.showMessageDialog(null,"插⼊成功!","插⼊操作",JOptionPane.ERROR_MESSAGE);}}catch (NumberFormatException e ){System.out.println(e);}catch (SQLException e){System.out.println(e);}}else{JOptionPane.showMessageDialog(null,"插⼊失败!","插⼊操作",JOptionPane.ERROR_MESSAGE);}}});b3.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent event)try {int r1=s.executeUpdate("update 员⼯基本信息表set 姓名='"+t2.getText()+"'," +"性别='"+t3.getText()+"'," +"年龄="+Integer.parseInt(t4.getText())+"," +"部门='"+t5.getText()+"'"+"where 员⼯编号='"+t1.getText()+"'");if(r1!=0){JOptionPane.showMessageDialog(null,"修改成功!","修改操作",JOptionPane.ERROR_MESSAGE);}else{JOptionPane.showMessageDialog(null,"修改失败!","修改操作",JOptionPane.ERROR_MESSAGE);}} catch (NumberFormatException e ){System.out.println(e);}catch (SQLException e){System.out.println(e);}}});b4.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent event){try{int r1=s.executeUpdate("delete from 员⼯基本信息表"+"where 员⼯编号='"+t1.getText()+"'");if(r1!=0){t1.setText("");t2.setText("");t3.setText("");t4.setText("");t5.setText("");JOptionPane.showMessageDialog(null,"删除成功!","删除操作",JOptionPane.ERROR_MESSAGE);}else{JOptionPane.showMessageDialog(null,"删除失败!","删除操作",JOptionPane.ERROR_MESSAGE);}} catch (NumberFormatException e ){System.out.println(e);}catch (SQLException e){System.out.println(e);}}});b5.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent event){t1.setText("");t2.setText("");t3.setText("");t4.setText("");t5.setText("");}});b6.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent event){try{if(r.next())t1.setText(r.getString(1));t2.setText(r.getString(2));t3.setText(r.getString(3));t4.setText(""+r.getInt(4));t5.setText(r.getString(5));}catch (NumberFormatException e ){System.out.println(e);} catch (SQLException e){System.out.println(e);}}});mm8.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent event){System.exit(0);}});}public static void main(String args[]){new A();}}。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
#include <fstream>
using namespace std;
void Link();
class Person
{
protected:
char name[10];//姓名
char level[20];//级别
int NO;//编号
int Flag;//标记
public:
Person *next;
int Get_Flag();
int *Get_Flag1();
};
Person::Person(char na[10],char le[20],int no,int F)
{
strcpy(name,na);
strcpy(level,le);
NO=no;
Flag=F;
}
int Person::Get_NO()
{
return sale*1.5+amount*0.1;
}
void Business::Show()
{
cout << "编号:" << NO << "\t" << "级别:" << level << "\t" << "名字:" << name << "\t"<< "工资" << Wage()<< endl;
{
return number*1000;
}
void Technical::Show()
{
cout << "编号:" << NO << "\t" << "级别:" << level << "\t" << "名字:" << name << "\t"<< "工资" << Wage()<< endl;
}
class Business:public Person//业务人
}
class Technical:public Person//技术人员technical
{
private:
double number;//代码量
public:
Technical(char na[10],char le[20],double dm,int no,int F);
Technical(){}
}
class Business_Manager:public Manager//业务经理
{
private:
double MB_salay;
double sale,amount;//sale业务经理总的月销售额amount业务经理总的项目额
{
private:
double sale,amount;//sale该业务人员当月销售额amount该业务员当月项目额
public:
Business(char na[10],char le[20],double sa,double am,int no,int F);
Business(){}
~Business(){}
读取方式:读取链表,写入文件。
5、总结和体会
通过这一次C++课程设计,让我学到了很多,让我学到对一个大型系统的设计不止是对代码的实现,要有一个洞察全局的心,就是先想好,有一个大致的规划,然后再去用代码实现非常容易,如果不想好就会写代码,那么会遇到很多问题,有时会使所做的功夫白费,所以提前想好是非常重要的。
void Show();
};
double Manager::Wage()
{
return 5000;
}
void Manager::Show()
{
cout << "编号:" << NO << "\t" << "级别:" << level << "\t" << "名字:" << name << "\t"<< "工资" << Wage()<< endl;
{
return NO;
}
char *Person::Get_Name()
{
return name;
}
char *Person::Get_Level()
{
return level;
}
int Person::Get_Flag()
{
return Flag;
}
int *Person::Get_Flag1()
double Wage();
void Show();
};
Business::Business(char na[10],char le[20],double sa,double am,int no,int F):Person(na,le,no,F)
{
sale=sa;
amount=am;
}
double Business::Wage()
Person(char na[10],char le[20],int no,int F);
Person(){}
~Person(){}
virtual void Show(){}
virtual double Wage(){}
int Get_NO();
char *Get_Name();
char *Get_Level();
在写公司人事管理系统时我遇到了很多问题,例如对文件的添加,使自己没有一点办法,在老师的耐心讲解下,终于完成了文件的添加,使自己对于文件有了新的认识,老师为我们讲解了类的实现,使自己有了新的理解,还让我体会到了交流的重要性,我虽然是社团的人员,但是很少和别人交流。我要学会去和别人交流想法。
代码如下:
#include <iostream>
{
return &Flag;
}
class Manager:public Person//经理manager.
{
public:
Manager(char na[10],char le[20],int no,int F):Person(na,le,no,F){}
Manager(){}
double Wage();
公司人事管理系统
专业
软件工程移动应用开发
学生姓名
郭迁迁
班级
Hale Waihona Puke 学号指导教师完成日期
2014/6/20
1、功能图
2、类图
3、界面
不同用户进入的选择界面
老板进入的界面
员工进入的界面
4、数据存储结构
保存方式:采用二进制进行数据的保存
结构:在每对员工的数据信息进行操作时,首先读取文件,然后进行下面增删查改等相应的操作,在对相应操作后自动进行数据的存盘
~Technical(){}
double Wage();
void Show();
};
Technical::Technical(char na[10],char le[20],double dm,int no,int F):Person(na,le,no,F)
{
number=dm;
}
double Technical::Wage()
相关文档
最新文档