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

CenterCenterCenterCenterCenterCenterCenterCenter

 

/*
* 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

 

 

  • 3
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

原来是阿中

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值