毕业设计(论文)-C#企业人力资源.doc_第1页
毕业设计(论文)-C#企业人力资源.doc_第2页
毕业设计(论文)-C#企业人力资源.doc_第3页
毕业设计(论文)-C#企业人力资源.doc_第4页
毕业设计(论文)-C#企业人力资源.doc_第5页
已阅读5页,还剩38页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

兰州交通大学毕业设计 论文 I 摘摘 要要 随着信息技术的迅猛发展以及人力资源管理的地位在企业中的日益提高 越来越多 的企业希望通过信息化的手段提升自身的人力资源管理水平 人力资源管理系统由此应 运而生 企业人力资源管理系统是一个典型的信息管理系统 服务于企业管理部门人 员 用于管理企业信息 本系统以 Microsoft Visual Studio 为开发平台 使用 C 编程语言实现 系统的主要 有功能模块有系统管理 工资设置 资源管理 人事管理 工资管理 数据库的连接 采用 ADO NET 技术实现 可以快速的完成人事信息的登记 查询 修改等功能 本 文详细介绍了人力资源管理系统的开发流程 包括需求分析 系统分析 概要设计 详细设计 以及测试与调试的整个过程 论文中主要介绍了工资管理模块的设计与实 现 在系统设计过程中采用面向对象的编程思想把对数据库的基本操作封装在 DataAccess 类 其他对象均通过继承 DataAccess 类 调用其中的数据库操作方法来完 成对数据库的访问 此系统将人力资源管理的科学性 合理性与计算机的方便快捷有 机地结合起来 给企业的人力资源管理带来更多的方便 关键词 企业人力资源 信息管理 关键词 企业人力资源 信息管理 C C ADO NETADO NET 兰州交通大学毕业设计 论文 II Abstract With the rapid development of information technology and daily improvement of the status of human resource management in the enterprise more and more companies want to promote the level of their human resource management by way of informatization As a result human resource management system comes into being Enterprise Human Resource Management System is a typical information management system which is serving for the employees in the management department to manage enterprise s information The system is developed on the platform of Microsoft Visual Studio implemented with C language It has the following functions System management Pay setting resource management personal management Pay management The connection with database is implemented with ADO NET technique so it can finish recording queering and modify the human resource information quickly The development procedures are detailed introduced in the paper such as requirement analysis function analysis constructional design detail design and testing using System Collections Generic using System Text using System Data SqlClient using System Data namespace empApplication class DataAccess 对数据库进行添加 删除 查询 修改的操作 public SqlConnection getConnection 根据你自己的数据库服务器修改用户和密码 string cstring server uid sa pwd database employees SqlConnection con new SqlConnection cstring return con 兰州交通大学毕业设计 论文 20 public bool ExecuteSQL string sql 执行sql语句 成功返回true SqlConnection con3 getConnection SqlCommand cmd new SqlCommand sql con3 try con3 Open cmd ExecuteNonQuery return true catch return false finally con3 Close public DataSet GetDataSet string sql string table 执行sql语句 返回dataset DataSet ds new DataSet SqlConnection con getConnection SqlDataAdapter da new SqlDataAdapter sql con try da Fill ds table catch Exception ex throw new Exception ex ToString finally da Dispose return ds 兰州交通大学毕业设计 论文 21 public int GetCount string sql 返回影响的行数 SqlConnection con2 getConnection SqlCommand cmd new SqlCommand sql con2 try con2 Open int count Convert ToInt32 cmd ExecuteScalar return count catch return 1 finally con2 Close con2 Dispose cmd Dispose 验证用户是否合法 public Boolean CheckUser UserInfoData userInfo string sql select from login where 编号 userInfo UserID and 密 码 userInfo Pwd if GetCount sql 0 return true else return false 兰州交通大学毕业设计 论文 22 4 2 系统类设计 类关系图如下 dataAccess datadata data data data datadata data data data datadatadata data data ClasshtglOperation dataAccess DataAccess new DataAccess insertpact ClasshtglData htgl updatepact ClasshtglData htgl deletepact string ygid bool bool bool DataAccess getConnection ExecuteSQL string sql GetDataSet string sql string table GetCount string sql CheckUser UserInfoData userInfo SqlConnection bool DataSet int Boolean DeptOperation data DataAccess new DataAccess insertDepInfo DeptInfo dept UpdateDepInfo DeptInfo dept delDeptInfo DeptInfo dept bool bool bool ImageOpe data DataAccess new DataAccess Read Image OpenFileDialog openF PictureBox MyImage SaveImage string MID OpenFileDialog openF void void UserInfoOperation data DataAccess new DataAccess insertEmployee UserInfoData user delEmployee UserInfoData user getUserInfo UserInfoData user updateUserInfo UserInfoData user bool bool DataSet bool courseOperation data DataAccess new DataAccess insertCourse courseInfo course UpdateCourse courseInfo course DelCourse courseInfo course IsCourseExist courseInfo course bool bool bool bool ddInfoOperation data DataAccess new DataAccess insertdd ddInfoData dd deldd ddInfoData dd updatedd ddInfoData dd bool bool bool employeeOperation data DataAccess new DataAccess insertEmployee employeeInfo emp UpdateEmployee employeeInfo emp DelEmployee employeeInfo emp IsExist employeeInfo emp bool bool bool bool gzcxInfoOperation data DataAccess new DataAccess getgzcx gzcxInfoData gzcx string str DataSet gzxxInfoOperation data DataAccess new DataAccess insertgzxx gzxxInfoData gzxx delgzxx gzxxInfoData gzxx updategzxx gzxxInfoData gzxx bool bool bool jlInfoOperation data DataAccess new DataAccess insertjl jlInfoData jl deljl jlInfoData jl getjlInfo jlInfoData jl updatejlInfo jlInfoData jl bool bool DataSet bool kpglInfoOperation data DataAccess new DataAccess insertkpgl kpglInfoData kp delkpgl kpglInfoData kp updatekpgl kpglInfoData kp bool bool bool punInfoOperation data DataAccess new DataAccess insertpun punInfoData pun delpun punInfoData pun getpunInfo punInfoData pun updatepunInfo punInfoData pun bool bool DataSet bool ygcfglInfoOperation data DataAccess new DataAccess insertcf ygcfglInfoData cf delcf ygcfglInfoData cf IsJLExist ygcfglInfoData cf updatecf ygcfglInfoData cf bool bool int bool ygjlglInfoOperation data DataAccess new DataAccess insertjf ygjlglInfoData jf deljf ygjlglInfoData jf IsJLExist ygjlglInfoData jf updatejf ygjlglInfoData jf bool bool int bool ygpxglInfoOperation data DataAccess new DataAccess insertygpxgl ygpxglInfoData px delygpxgl ygpxglInfoData px updateygpxgl ygpxglInfoData px bool bool bool ygxxcxInfoOperation data DataAccess new DataAccess getgzcx ygxxcxInfoData gzcx string str DataSet 图 4 1 类图 兰州交通大学毕业设计 论文 23 4 3 系统栏目设计 图 4 2 系统的主界面 系统的主界面主要有七组子菜单组成 子菜单里包括系统的具体功能 系统管理 工资设置 资源管理 人事管理 工资管理 关于 当主窗体运行时 首先启动登录窗口 如果不能通过身份验证 就不能进入系统 进行系统的操作 兰州交通大学毕业设计 论文 24 图 4 3 系统的登录界面 登录模块的代码如下 using System using System Collections Generic using System ComponentModel using System Data using System Drawing using System Text using System Windows Forms namespace empApplication public partial class Frmlogin Form public Frmlogin InitializeComponent private void Frmlogin Load object sender EventArgs e private void button1 Click object sender EventArgs e 登录 兰州交通大学毕业设计 论文 25 UserInfoData user new UserInfoData string uid this textUser Text Trim string passwd this textPwd Text Trim if uid user Pwd passwd DataAccess data new DataAccess if data CheckUser user constants UserID user UserID MDIParent1 winmain new MDIParent1 winmain Show this Hide else MessageBox Show 您的编号或密码输入有误 请重新输入 this textUser Text this textPwd Text else MessageBox Show 请输入编号和密码 this textUser Text this textPwd Text private void button2 Click object sender EventArgs e Application Exit 兰州交通大学毕业设计 论文 26 4 4 人事管理模块设计 4 4 1 人事信息维护 人事信息管理模块设计主要包括对企业员工的管理 管理员通过相关按钮的使用可修 改 删除 添加和更新部门信息 使用 Connection 对象与数据库建立连接后 可以使用 Command 对象来对数据源执行查询 插入 删除 更新等各种操作 图 4 4 部门信息维护页面 技术要点 首先定义两个公共类 来完成对部门信息的所有操作 DeptInfo 类的定义 using System using System Collections Generic using System Text namespace empApplication class DeptInfo private string deptNo private string nowNO 兰州交通大学毕业设计 论文 27 private string deptName private string chairMan private string fullName private string telePhone private string address private string jibie public string DeptNO get return deptNo set deptNo value public string NowNo get return nowNO set nowNO value public string DeptName get return deptName set deptName value public string ChairMan get return chairMan set chairMan value public string FullName get return fullName set fullName value public string TelePhone get return telePhone set telePhone value public string Address 兰州交通大学毕业设计 论文 28 get return address set address value public string JiBie get return jibie set jibie value DeptOperation 类的定义如下 using System using System Collections Generic using System Text namespace empApplication class DeptOperation private static DataAccess data new DataAccess public static bool insertDepInfo DeptInfo dept 插入部门信息 string sql insert into department 部门编号 本级编号 部门名称 部门主管 部门全称 部门地址 部门电话 部门级次 values dept DeptNO dept NowNo dept DeptName dept ChairMan dept FullName dept Address dept TelePhone dept JiBie return data ExecuteSQL sql public static bool UpdateDepInfo DeptInfo dept 更新部门信息 string sql update department set 本级编号 dept NowNo 部门名称 dept DeptName 部门主管 dept ChairMan 部门全称 dept FullName 部门地址 dept Address 部门电话 dept TelePhone 部门级次 兰州交通大学毕业设计 论文 29 dept JiBie where 部门编号 dept DeptNO return data ExecuteSQL sql public static bool delDeptInfo DeptInfo dept 删除 string sql delete from department where 部门编号 dept DeptNO return data ExecuteSQL sql 部门信息管理代码编写如下 using System using System Collections Generic using System ComponentModel using System Data using System Drawing using System Text using System Windows Forms namespace empApplication public partial class Frmbmgl Form private static DataAccess data new DataAccess public Frmbmgl InitializeComponent private void Frmbmgl Load object sender EventArgs e TODO 这行代码将数据加载到表 employeesDataSet department 中 您 可以根据需要移动或移除它 this departmentTableAdapter Fill this employeesDataSet department TODO 这行代码将数据加载到表 employeesDataSet department 中 您 兰州交通大学毕业设计 论文 30 可以根据需要移动或移除它 this departmentTableAdapter Fill this employeesDataSet department private void btxg Click object sender EventArgs e 修改部门信息 int i this dataGridView1 SelectedRows Count if i 0 DataGridViewRow dr dataGridView1 SelectedRows 0 this textBox1 Text dr Cells 0 Value ToString this textBox2 Text dr Cells 1 Value ToString this textBox3 Text dr Cells 2 Value ToString this textBox4 Text dr Cells 4 Value ToString this textBox5 Text dr Cells 3 Value ToString this textBox6 Text dr Cells 6 Value ToString this textBox7 Text dr Cells 5 Value ToString this textBox8 Text dr Cells 7 Value ToString private void btadd Click object sender EventArgs e 添加部门信息 DeptInfo dept new DeptInfo if this textBox1 Text this textBox1 Text null MessageBox Show 请填写部门编号 return else dept DeptNO this textBox1 Text Trim string sql select from department where 部门编号 dept DeptNO 兰州交通大学毕业设计 论文 32 if data GetCount sql 0 MessageBox Show 该部门编号已存在 请重输编号 return else dept NowNo this textBox2 Text Trim dept DeptName this textBox3 Text Trim dept ChairMan this textBox4 Text Trim dept FullName this textBox5 Text Trim dept TelePhone this textBox6 Text Trim dept Address this textBox7 Text Trim dept JiBie this textBox8 Text Trim bool flag DeptOperation insertDepInfo dept if flag this departmentTableAdapter Fill this employeesDataSet department MessageBox Show 添加成功 this textBox1 Text this textBox2 Text this textBox3 Text this textBox4 Text this textBox5 Text this textBox6 Text this textBox7 Text this textBox8 Text private void btdel Click 1 object sender EventArgs e 删除部门信息 int i this dataGridView1 SelectedRows Count if i 1 兰州交通大学毕业设计 论文 33 MessageBox Show 请选择要删除的记录行 提示 return else int index this dataGridView1 CurrentRow Index DeptInfo dept new DeptInfo if MessageBox Show 确认要删除吗 删除 MessageBoxButtons YesNo DialogResult Yes dept DeptNO employeesDataSet Tables department Rows index 部门编号 ToString bool flag DeptOperation delDeptInfo dept if flag this departmentTableAdapter Fill this employeesDataSet department MessageBox Show 删除成功 private void btexit Click object sender EventArgs e this Close 兰州交通大学毕业设计 论文 34 4 4 2 员工信息查询 因为后边的设计思想和部门管理的一样 所以代码略 图 4 5 部门信息查询页面 兰州交通大学毕业设计 论文 35 4 5 工资管理模块设计 4 5 1 工资信息管理 工资信息管理部分主要包括对企业的员工的工资相关信息进行管理 用户可查看 添加 修改 删除员工工资信息 图 4 6 员工工资信息管理页面 兰州交通大学毕业设计 论文 36 4 5 2 员工奖励管理 主要是对员工奖励和补贴信息的添加 删除等维护工作 图 4 7 员工奖励管理页面 兰州交通大学毕业设计 论文 37 4 6 用户管理模块设计 4 6 1 用户管理 只用 admin 用户登录系统后可以打开此界面 有权限查看现有用户 添加 删除 用户 平时登录系统进行信息维护时 用一般级别的用户登录 这用可以在很大程度 上增加系统的安全级别 图 4 8 用户管理页面 4 6 2 密码修改 用户只能修改自己的密码 别的用户的密码无法修改 增加了系统的安全性 图 4 9 密码修改界面 兰州交通大学毕业设计 论文 38 总 结 本论文叙述到的企业人力资源管理系统是用 C

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论