纯C实现员工工资管理系统

时间:2023-01-27 23:02:20

纯C实现员工工资管理系统纯C实现员工工资管理系统纯C实现员工工资管理系统纯C实现员工工资管理系统纯C实现员工工资管理系统纯C实现员工工资管理系统纯C实现员工工资管理系统纯C实现员工工资管理系统

/*
* Author: 张小语
* Date: 2016/12/31
* Ver.: V1.0.0
*/
#define _CRT_SECURE_NO_WARNINGS
#include "InquireManage.h"
#include "CountManage.h"
#include "SortManage.h"
#include "LinkerManage.h"
#include "File.h"
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
#include <conio.h>

extern FILE *fp; //文件指针
extern long LEN ; //链表长度
extern enum jobname job; //4种员工的枚举类型
struct employee *head = NULL; //头指针

// =============================================================================
/*主控函数 菜单函数*/
void main()
{
int sel = 0; //sel 选项

system("color E");
system("title 作者:张小语");
printf("===============================================================================\n");
printf(" *欢迎来到员工管理系统*\n");
printf("===============================================================================");

if (LEN == 0)
head = FileLoad(); //加载记录
LinkerLength(head); //计算链表长度
printf("\n一共加载了%d个记录!", LEN);
printf("\n请任意键进入系统...");
getchar();

while (1)
{
system("cls");

LinkerLength(head); //重新计算链表长度 防止删除或添加后长度没改变
printf("\n\n\n\n\n ◆━━━━━━━━主菜单━员工工资管理系统━━━━━◆\n");
printf(" ┃ ┃\n");
printf(" ┃ 1.员工管理 2.查询管理 ┃\n");
printf(" ┃ ┃\n");
printf(" ┃ 3.排序管理 4.统计管理 ┃\n");
printf(" ┃ ┃\n");
printf(" ┃ 0.退出系统 ┃\n");
printf(" ┃ ┃\n");
printf(" ◆━━━━━━━━━━━━━━━━━━━━━━━━━◆\n");
printf("\n\n\n\n请选择(1-4,0退出)\n");
scanf("%d", &sel);

switch (sel)
{
case 1:
EmployeeManage(head); //1.员工管理
break;
case 2:
InquireManage(head); //2.查询管理
break;
case 3:
SortManage(head); //3.排序管理
break;
case 4:
CountManage(head); //4.统计管理
break;
case 0:
FileSave(head); //0退出时自动保存
printf("欢迎您下次再次使用!");
_getch();
return;
default:
printf("\n输入错误,请按任意键继续...");
getchar();
break;
}
}
}

完整代码:

http://download.csdn.net/detail/zhangxiaoyu_sy/9889864