ImageVerifierCode 换一换
格式:DOCX , 页数:14 ,大小:17.26KB ,
资源ID:17622399      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/17622399.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(人事管理系统代码文档格式.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

人事管理系统代码文档格式.docx

1、void menu();void printf_face()/*显示数据结构项目函数*/ printf(num name sex age duty titile landscape quilification servicetime cometime categoryn); void printf_one(struct staff p)/*输出单个数据函数*/ %-4s%-7s%-6s%-3d%-11s%-7s%-8s%-18s%-7d%-12s%-3sn,p.num,p.name,p.sex,p.age,p.duty,p.title,p.p_landscape,p.Qualification

2、s,p.Service_time,e_time,p.category);int load()/*加载函数*/ int i=0;FILE *fp;if(fp=fopen(text.txt,rb)=NULL) return 0; exit(0);for(i=0;!feof(fp);i+) /*输出数据到结构体*/ fscanf(fp,%s %s %s %d %s %s %s %s %d %s %sn,staffi.num,staffi.name,staffi.sex,&staffi.age,staffi.duty,staffi.title,staffi.p_landscape,staffi.Qua

3、lifications,&staffi.Service_time,e_time,staffi.category);fclose(fp);return i;int search_data()/*查找单个数据函数*/ int i,flag;char s30,w0;system(cls/*清屏*/ n=load();do fflush(stdin); /*清除缓冲区输入*/ By1)Number 2)Name bbw0=getchar(); while(w02if(w0=)/*按编号查找*/ flag=0;puts(Enter staffs number:scanf(%s,s);in;i+) if(

4、strcmp(s,staffi.num)=0) printf_face();printf_one(staffi);flag=1;break;else continue;if(flag=0)puts(The staffs name dosenot exsist !else /*按姓名查找*/ Enter staff name:if(strcmp(s,staffi.name)=0) if(flag=0) puts(s message dosenot exsist !void save_all()/*保存所有数据函数*/ int i;wbCannotopen file!exit(0);if(staf

5、fi.age!=0) fprintf(fp,staffi.num,staffi.name,staffi.sex,staffi.age,staffi.duty,staffi.title,staffi.p_landscape,staffi.Qualifications,staffi.Service_time,e_time,staffi.category);int test(char h10)/*检查编号是否重复*/ i+) if(strcmp(h,staffi.num)=0) The number has exsist!please nter again!pausereturn 1;void sa

6、ve(struct staff p)/*保存单个数据函数*/ ab+Cannot open file!Succeseful to save message!n/*修改模块*/ void modify() int k=0,w0,g;char h30,w1,w2;loop: g=search_data();if(gn) tttModify: 1)Numderttt 2)Namettt 3)Sexttt 4)Agettt 5)Dutyttt 6)Titlettt 7)Landscapettt 8)Qualificationsttt 9)Service timettt 10)Come timettt

7、11)Category Please choice : bb%d,&w0);while(w011);switch(w0) case 1:Enter New Number:,h);strcpy(staffg.num,h);case 2:Enter name:strcpy(staffg.name,h);case 3:Enter sex:strcpy(staffg.sex,h);case 4:Enter age:k);staffg.age=k;case 5:Enter duty:strcpy(staffg.duty,h);case 6:Enter titile:strcpy(staffg.title

8、,h);case 7:Enter landscape:strcpy(staffg.p_landscape,h);case 8:Enter qualiications:strcpy(staffg.Qualifications,h);case 9:Enter service time:staffg.Service_time=k;case 10:Enter come time:strcpy(e_time,h);case 11:Enter category:strcpy(staffg.category,h);Are you sure to save?1)Yes 2)No bbw1=getchar();

9、while(w1if(w1=)save_all(); puts(Succesefull to save!1)Continue to modify 2)Back to menu 3)Exist bbw2=getchar();while(w23if(w2=)goto loop;else if(w2=)menu();else exit(0);/*保存模块*/ void zhun()char w0;save_all();Have save all message!1) Back to menu 2) Exist bb/*查找模块*/ void search() int k;char w1; k=sea

10、rch_data();1)Back to menu 2)Exist 3)Continue to search bbelse if(w1=)exit(0);else goto loop;/*增加模块*/ void add() char w0,w1; system(munder(exmple 001):,s.num);if(test(s.num)goto loop;/*编号重复*/ name:,s.name);sex(male,female):,s.sex);age:s.age);duty(jiaochou fujiaochou jiangshi zhujiao xuesheng houjin):

11、,s.duty);title (NO low hight):,s.title);landscape( party not ):,s.p_landscape);hightest qualifications(xiaoxue zhuzhong gaozhong daxue shuoshi gengao):,s.Qualifications);serve time:s.Service_time);come time(example 20050101):,e_time);category(massenger teacher staff enteir linshigong):,s.category);S

12、ave or not?1)Yes 2)No bbswitch(w0-48) case 1:save(s);1)Coninnue to add 2)Back to menu 3)Exist bb/*删除模块*/ void delete_data() char w0,w1;if(kAre you sure to delete? 1)Yes 2)No bb) staffk.age=0;This staff massege has deleteed!1)Continue to delete 2)Back to menu 3)Exisi bb) goto loop;/*统计模块*/ void stast

13、ic() int i,count;if(n=0) No data!getchar();menu();By1)Staff on work 2)party membern 3)female count 4)Highest qualifications bb4)/*统计在职人员*/ for(i=0,count=0;n&staffi.age;if(strcmp(staffi.category,enteir)!=0&strcmp(staffi.category,linshigong=0)count+; printf_one(staffi);ttttTotal%dmessages,count);else

14、if(w0=)/*统计党员*/ if(strcmp(staffi.p_landscape,party)=0)/*统计女工人员*/ if(strcmp(staffi.sex,femalttttTotal%dmessageelse /*统计高学历人员*/ if(strcmp(staffi.Qualifications,shuoshi)=0|strcmp(staffi.Qualifications,更高n1)Continue to stastic 2)Back to menu 3)Exist bb/*排序模块*/ void sort() int i,j;struct staff s1; n=load();By 1)age 2)Come time bb)/*按年龄排序*/ n-1;i+)/*选择法排序*/ for(j=i+1;jstaffj.age) s1=staffi;staffi=staffj;staffj=s1;else /*按来院时间排序*/ if(strcmp(e_time,e_time)0) i+) /*显示排序结果*/ n1)Back tomenu 2)Continue 3)Exist bb) menu();/*浏览模块*/ void browse() n ;ttttTatal( %d)messagen,n); 1)Back to m

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1