Windows系统编程课程设计报告-人事管理系统.doc_第1页
Windows系统编程课程设计报告-人事管理系统.doc_第2页
Windows系统编程课程设计报告-人事管理系统.doc_第3页
Windows系统编程课程设计报告-人事管理系统.doc_第4页
Windows系统编程课程设计报告-人事管理系统.doc_第5页
已阅读5页,还剩28页未读 继续免费阅读

下载本文档

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

文档简介

中南民族大学计算机科学学院windows系统编程课程设计报告题 目: 人事管理系统 (人事档案管理设计) 专 业 自动化 学 生 姓 名 班 级 学 号 1班 08064009 完 成 日 期 2010年12月29日 指 导 教 师 一、课题名称人事管理系统(人事档案管理设计)二、课题内容和要求1.内容:现代企业对人事档案管理的重视程度正在快速提高,而信息技术在人力资源管理中的应用,将有助于企业优化人事档案管理的业务流程,提高工作效率,改善服务质量,并提供基于信息的决策支持。本文主要介绍了人力资源管理系统的分析、结构特性设计及行为特性设计的实现过程,详细论述了总体设计思想、数据库设计和功能模块设计。实现了人员信息管理,考勤管理,员工考核,奖罚管理,教育培训等功能。整个系统的设计过程中,充分考虑了数据库的安全性、一致性、稳定性和可靠性的问题,并具有很强的向导作用,为操作人员提供了丰富的决策功能,而且操作简单方便。2.要求:建立一个合理的人事档案管理系统,从而能够对单位人事档案做完善的管理,使企业管理更加科学规范,并能根据系统提供的准确信息进行适当的调整,使企业更好发展。 并做到以下几点:简单性: 系统设计尽量简单,从而实现使用方便、提高效率、节省开支、提高系统的运行质量。灵活性: 系统对外界条件的变化有较强的适应能力。完整性: 系统是各个子系统的集合,作为一个有机的整体存在。因此,要求各个子系统的功能尽量规范,数据采集统一,语言描述一致。可靠性: 实现安全的、可靠的数据保护措施。三、开发工具介绍access2000的介绍:1.基本含义access2000是office自带的数据库 access 是office2000里面的一个组件。是用来制作简单的数据库。 还有的意思就是访问、还有接入的意思。 如access list 访问列表 access point 接入点 2.access 数据库功能简介在办公软件office套件中,最为广大用户熟悉的是word和excel,因为它们功能强大且方便易用,更因为它们不仅可用于办公,还可用于个人写作和家庭记帐理财等。同为office套件中一部分的access,虽然有着同样强大的功能,但使用的人却相对少些,不像word和excel那样广泛。事实上,真正用过access的用户,对其强大功能和灵活应用均称赞有加。 access 数据库管理系统是microsoft office 套件的重要组成部分,适用于小型商务活动,用以存贮和管理商务活动所需要的数据。access不仅是一个数据库,而且它具有强大的数据管理功能,它可以方便地利用各种数据源,生成窗体(表单),查询,报表和应用程序等。 数据库是有结构的数据集合,它与一般的数据文件不同,(其中的数据是无结构的)是一串文字或数字流。数据库中的数据可以是文字、图像、声音等。 3.相关信息microsoft access是一种关系式数据库,关系式数据库由一系列表组成,表又由一系列行和列组成,每一行是一个记录,每一列是一个字段,每个字段有一个字段名,字段名在一个表中不能重复。图1是一个“产品”表的例子。“产品”表由10个记录组成,一个记录占一行,每一个记录由产品id、产品名称、库存量、订货量、单价和折扣率6个字段组成。“产品id”是字段名,其下面的1,2等是字段的值。 表与表之间可以建立关系(或称关联,连接),以便查询相关联的信息。access数据库以文件形式保存,文件的扩展名是mdb。4.access 数据库的对象access 数据库由六种对象组成,它们是表、查询、窗体、报表、宏和模块。 表(table) 表是数据库的基本对象,是创建其他5种对象的基础。表由记录组成,记录由字段组成,表用来存贮数据库的数据,故又称数据表。 查询(query)查询可以按索引快速查找到需要的记录,按要求筛选记录并能连接若干个表的字段组成新表。 窗体(form) 窗体提供了一种方便的浏览、输入及更改数据的窗口。还可以创建子窗体显示相关联的表的内容。窗体也称表单。 报表(report) 报表的功能是将数据库中的数据分类汇总,然后打印出来,以便分析。 宏(macro) 宏相当于dos中的批处理,用来自动执行一系列操作。access列出了一些常用的操作供用户选择,使用起来十分方便。 模块(module) 模块的功能与宏类似,但它定义的操作比宏更精细和复杂,用户可以根据自己的需要编写程序。模块使用visual basic编译。visual c+ 6.0简介:visual c+ 6.0 是微软推出的一款c+编译器,将“高级语言”翻译为“机器语言(低级语言)”的程序 简称vc或者vc6.0 由于c+是由c语言发展起来的 也支持c语言的编译 6.0版本是使用最多的版本,很经典。 最大的缺点是对于模版的支持比较差 现在的最新版c+编译器集合在microsoft visual studio 2010软件包含c+,visual basic,c#,j#,.net。其中,vc开发环境的版本已经升级至microsoft visual c+ 2010,对c+的支持更加全面稳定四、设计思路我主要负责人事档案管理这一模块整个系统包括系统管理、基础数据管理、人事档案管理、考勤管理、数据库管理以及备忘录6大模块。并分为管理员系统和用户系统。 总体设计思想 首先根据用户的情况制定完善的权限管理,用户根据权限进入,拥有不同的操作功能。系统包括系统管理、基础数据管理、人事档案管理、考勤管理、数据库管理以及备忘录功能,并提供查询。重点突出灵活的人员信息管理。 系统设计为c/s(客户机/服务器)模式,服务器程序主要采用access,可以平稳的向sql server等大型数据库做平稳的升级,本应用软件主要针对客户机来设计和编程,实现对数据库的备份操作,并提供数据完整性检验及数据保护等措施。 我主要负责的人事档案管理这一模块功能的设计如下:人事档案管理包括人事档案浏览、人事资料查询和人事资料统计三大部分。人事档案浏览 基本档案:录入人员人事资料(包括个人基本信息,职工编号,社会背景,联系方式,入职时间,职工类型,工资类别和其它)。 家庭成员:录入员工家庭成员资料(包括与本人关系,工作单位,担任职务,联系方式) 工作经历:主要记录员工工作中升降的历程奖罚记录:主要记录员工在工作期间获得的各种奖励以及惩罚职称评定:录入员工在工作期间所获得的工作能力的认证培训记录:主要记录员工在职期间的教育培训情况 人事资料查询查询条件分为个人信息和部门信息两部分,只需输入部分知道的信息,点击查询即可查到符合条件的员工信息人事资料统计 通过各种类别(包括性别,民族,年龄,籍贯,职务,文化程度,政治面貌,婚姻状况,工资类别等)来对员工进行系统的统计相应代码:人事档案浏览:/ browsedlg.cpp : implementation file/#include stdafx.h#include manager.h#include browsedlg.h#include aboutpayset.h#include deptset.h#include dutyset.h#include educationset.h#include folkset.h#include politicalset.h#include technicalset.h#include workerstatusset.h#ifdef _debug#define new debug_new#undef this_filestatic char this_file = _file_;#endif/ cbrowsedlg dialogcbrowsedlg:cbrowsedlg(cwnd* pparent /*=null*/): cdialog(cbrowsedlg:idd, pparent)/afx_data_init(cbrowsedlg)m_strcontent = _t();m_strcode = _t();m_strname = _t();m_ncondition = -1;/afx_data_initm_bnew = false;void cbrowsedlg:dodataexchange(cdataexchange* pdx)cdialog:dodataexchange(pdx);/afx_data_map(cbrowsedlg)ddx_control(pdx, idc_button_cancel, m_ctrcancelbnt);ddx_control(pdx, idc_button_modify, m_ctrmodify);ddx_control(pdx, idc_button_save, m_ctrsavebnt);ddx_control(pdx, idc_button_new, m_ctrnewbnt);ddx_control(pdx, idc_button_delete, m_ctrdelbnt);ddx_control(pdx, idc_combo_condition, m_ctrcondition);ddx_control(pdx, idc_combo_content, m_ctrcontent);ddx_control(pdx, idc_list1, m_ctrlist);ddx_control(pdx, idc_tab1, m_ctrtabsheet);ddx_cbstring(pdx, idc_combo_content, m_strcontent);ddx_text(pdx, idc_edit_code, m_strcode);ddx_text(pdx, idc_edit_name, m_strname);ddx_cbindex(pdx, idc_combo_condition, m_ncondition);/afx_data_mapbegin_message_map(cbrowsedlg, cdialog)/afx_msg_map(cbrowsedlg)on_notify(nm_click, idc_list1, onclicklist1)on_cbn_selchange(idc_combo_condition, onselchangecombocondition)on_cbn_selchange(idc_combo_content, onselchangecombocontent)on_cbn_editupdate(idc_combo_content, oneditupdatecombocontent)on_bn_clicked(idc_button_search, onbuttonsearch)on_bn_clicked(idc_button_new, onbuttonnew)on_bn_clicked(idc_button_save, onbuttonsave)on_bn_clicked(idc_button_delete, onbuttondelete)on_bn_clicked(idc_button_modify, onbuttonmodify)on_notify(tcn_selchange, idc_tab1, onselchangetab1)on_notify(tcn_selchanging, idc_tab1, onselchangingtab1)on_bn_clicked(idc_button_cancel, onbuttoncancel)on_wm_close()on_wm_destroy()/afx_msg_mapend_message_map()/ cbrowsedlg message handlersbool cbrowsedlg:oninitdialog() cdialog:oninitdialog();/设置员工基本档案属性页的记录集/实现主体对话框与属性页对话框的数据一致m_baseinfodlg.m_ppersonset = &m_recordset;/建立员工列表m_ctrlist.insertcolumn(0,姓名);m_ctrlist.insertcolumn(1,员工号);m_ctrlist.setextendedstyle(lvs_ex_fullrowselect|lvs_ex_gridlines);m_ctrlist.setcolumnwidth(0,80);m_ctrlist.setcolumnwidth(1,80);/在员工列表中显示员工姓名和员工号cstring strsql;strsql=select * from person;refreshdata(strsql);/添加各个属性页m_ctrtabsheet.addpage(基本档案, &m_baseinfodlg, idd_page_baseinfo);m_ctrtabsheet.addpage(家庭成员, &m_familydlg, idd_page_family);m_ctrtabsheet.addpage(工作经历, &m_historydlg, idd_page_history);m_ctrtabsheet.addpage(奖惩纪录, &m_honordlg, idd_page_honor);m_ctrtabsheet.addpage(职称评定, &m_qualificationdlg, idd_page_qualification);m_ctrtabsheet.addpage(培训纪录, &m_traindlg, idd_page_train);m_ctrtabsheet.show();return true; void cbrowsedlg:refreshdata(cstring strsql)m_ctrlist.deleteallitems();m_ctrlist.setredraw(false);updatedata(true);/strsql=select * from dept;if(!m_recordset.open(afx_db_use_default_type,strsql)messagebox(打开数据库失败!,数据库错误,mb_ok);return ;/m_recordset.movefirst();int i=0;while(!m_recordset.iseof()m_ctrlist.insertitem(i,m_recordset.m_name);m_ctrlist.setitemtext(i+,1,m_recordset.m_id);m_recordset.movenext();m_recordset.close();m_ctrlist.setredraw(true);void cbrowsedlg:onclicklist1(nmhdr* pnmhdr, lresult* presult) / todo: add your control notification handler code here/更新当前记录信息int i = m_ctrlist.getselectionmark();m_strname = m_ctrlist.getitemtext(i,0);m_strcode = m_ctrlist.getitemtext(i,1);m_baseinfodlg.m_strid = m_strcode;m_baseinfodlg.refreshdata();updatedata(false);/设置按钮状态m_ctrnewbnt.enablewindow(true);m_ctrdelbnt.enablewindow(true);m_ctrsavebnt.enablewindow(false);m_ctrcancelbnt.enablewindow(false);m_ctrmodify.enablewindow(true);m_bnew = false;m_baseinfodlg.m_ctrid.enablewindow(false);/更新各属性页信息m_familydlg.refreshdata(m_strcode);m_historydlg.refreshdata(m_strcode);m_honordlg.refreshdata(m_strcode);m_qualificationdlg.refreshdata(m_strcode);/m_recorddlg.refreshdata(m_strcode);m_traindlg.refreshdata(m_strcode);*presult = 0;void cbrowsedlg:onselchangecombocondition() / todo: add your control notification handler code hereupdatedata();cstring strsql;/清空combobox查询内容/int ncount=m_ctrcontent.getcount();for(int i=0;incount;i+)m_ctrcontent.deletestring(0);/按照选择的查询条件,添加查询内容/if(0=m_ncondition)/按部门查询cdeptset recordset ;strsql=select * from dept;if(!recordset.open(afx_db_use_default_type,strsql)messagebox(打开数据库失败!,数据库错误,mb_ok);return ;while(!recordset.iseof()m_ctrcontent.addstring(recordset.m_dept);recordset.movenext();recordset.close();else if(1=m_ncondition)/按职工职务查询cdutyset recordset ;strsql=select * from duty;if(!recordset.open(afx_db_use_default_type,strsql)messagebox(打开数据库失败!,数据库错误,mb_ok);return ;while(!recordset.iseof()m_ctrcontent.addstring(recordset.m_duty);recordset.movenext();recordset.close();else if(2=m_ncondition)/按职工职称查询ctechnicalset recordset ;strsql=select * from technical;if(!recordset.open(afx_db_use_default_type,strsql)messagebox(打开数据库失败!,数据库错误,mb_ok);return ;while(!recordset.iseof()m_ctrcontent.addstring(recordset.m_technical);recordset.movenext();recordset.close();else if(3=m_ncondition)/按职工类型查询cworkerstatusset recordset ;strsql=select * from status;if(!recordset.open(afx_db_use_default_type,strsql)messagebox(打开数据库失败!,数据库错误,mb_ok);return ;while(!recordset.iseof()m_ctrcontent.addstring(recordset.m_workstatus);recordset.movenext();recordset.close();else if(4=m_ncondition)/按工资类别查询caboutpayset recordset ;strsql=select * from aboutpay;if(!recordset.open(afx_db_use_default_type,strsql)messagebox(打开数据库失败!,数据库错误,mb_ok);return ;while(!recordset.iseof()m_ctrcontent.addstring(recordset.m_aboutpay);recordset.movenext();recordset.close();else if(5=m_ncondition)/按职工性别查询m_ctrcontent.addstring(男);m_ctrcontent.addstring(女);else if(6=m_ncondition)/按婚姻状况查询m_ctrcontent.addstring(未婚);m_ctrcontent.addstring(已婚);else if(7=m_ncondition)/按职工民族查询cfolkset recordset ;strsql=select * from folk;if(!recordset.open(afx_db_use_default_type,strsql)messagebox(打开数据库失败!,数据库错误,mb_ok);return ;while(!recordset.iseof()m_ctrcontent.addstring(recordset.m_folk);recordset.movenext();recordset.close();else if(8=m_ncondition)/按政治面貌查询cpoliticalset recordset ;strsql=select * from political;if(!recordset.open(afx_db_use_default_type,strsql)messagebox(打开数据库失败!,数据库错误,mb_ok);return ;while(!recordset.iseof()m_ctrcontent.addstring(recordset.m_political);recordset.movenext();recordset.close();else if(9=m_ncondition)/按文化程度查询ceducationset recordset ;strsql=select * from education;if(!recordset.open(afx_db_use_default_type,strsql)messagebox(打开数据库失败!,数据库错误,mb_ok);return ;while(!recordset.iseof()m_ctrcontent.addstring(recordset.m_education);recordset.movenext();recordset.close();/设置按钮状态m_ctrnewbnt.enablewindow(true);m_ctrdelbnt.enablewindow(true);m_ctrsavebnt.enablewindow(false);m_ctrcancelbnt.enablewindow(false);m_ctrmodify.enablewindow(true);m_bnew = false;m_baseinfodlg.m_ctrid.enablewindow(false);void cbrowsedlg:onselchangecombocontent() / todo: add your control notification handler code here/设置按钮状态m_ctrnewbnt.enablewindow(true);m_ctrdelbnt.enablewindow(true);m_ctrsavebnt.enablewindow(false);m_ctrcancelbnt.enablewindow(false);m_ctrmodify.enablewindow(true);m_bnew = false;m_baseinfodlg.m_ctrid.enablewindow(false);void cbrowsedlg:oneditupdatecombocontent() / todo: add your control notification handler code herevoid cbrowsedlg:onbuttonsearch() / todo: add your control notification handler code hereupdatedata(true);if(m_nconditioni)messagebox(请选择一个职工进行删除!);return;cstring strsql;strsql.format(select * from person where id=%s,m_ctrlist.getitemtext(i,1);if(!m_recordset.open(afx_db_use_default_type,strsql)messagebox(打开数据库失败!,数据库错误,mb_ok);return ;/删除该用户m_recordset.delete();m_recordset.close();/更新用户列表strsql = select * from person;refreshdata(strsql);/更新对话框上当前记录信息m_strcode = ;m_strname = ;updatedata(false);m_baseinfodlg.clear();/更新各属性页信息m_familydlg.refreshdata(m_strcode);m_historydlg.refreshdata(m_strcode);m_honordlg.refreshdata(m_strcode);m_qualificationdlg.refreshdata(m_strcode);/m_recorddlg.refreshdata(m_strcode);m_traindlg.refreshdata(m_strcode);void cbrowsedlg:onbuttonmodify() / todo: add your control notification handler code here/保存数据到数据库中if(!m_baseinfodlg.modify()return;m_baseinfodlg.refreshdata();/更新对话框上当前记录信息m_strname = m_baseinfodlg.m_strname;m_strcode = m_baseinfodlg.m_strid;updatedata(false);/更新列表信息cstring strsql;strsql=select * from person;refreshdata(strsql);/更新各属性页信息m_familydlg.refreshdata(m_strcode);m_historydlg.refreshdata(m_strcode);m_honordlg.refreshdata(m_strcode);m_qualificationdlg.refreshdata(m_strcode);/m_recorddlg.refreshdata(m_strcode);m_traindlg.refreshdata(m_strcode);void cbrowsedlg:onselchangetab1(nmhdr* pnmhdr, lresult* presult) / todo: add your control notification handler code hereif(m_bnew)m_ctrtabsheet.setcursel(1);m_ctrtabsheet.setcursel(0);m_ctrtabsheet.updatewindow();*presult = 0;return;*presult = 0;void cbrowsedlg:onselchangingtab1(nmhdr* pnmhdr, lresult* presult) / todo: add your control notification handler code here*presult = 0;void cbrowsedlg:onbuttoncancel() /设置按钮状态m_ctrnewbnt.enablewindow(true);m_ctrdelbnt.enablewindow(true);m_ctrsavebnt.enablewindow(false);m_ctrcancelbnt.enablewindow(false);m_ctrmodify.enablewindow(true);m_bnew = false;void cbrowsedlg:onclose() / todo: add your message handler code here and/or call defaultcdialog:onclose();void cbrowsedlg:ondestroy() cdialog:ondestroy();/ todo: add your message handler code here人事档案查询:csearchdlg:csearchdlg(cwnd* pparent /*=null*/): cdialog(csearchdlg:idd, pparent)/afx_data_init(csearchdlg)m_straboutpay = _t();m_strdept = _t();m_strduty = _t();m_streducation = _t();m_strfolk = _t();m_strisworker = _t();m_strmarry = _t();m_strpolitical = _t();m_strsex = _t();m_strtechnical = _t();m_nage = 0;m_strdept2 = _t();m_strdept3 = _t();m_strname

温馨提示

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

评论

0/150

提交评论