|
|
|
@ -21,7 +21,7 @@ int ghsc(); //
|
|
|
|
|
int salary(); //薪水统计
|
|
|
|
|
int modify(); //修改
|
|
|
|
|
int ghxg(); //按工号修改
|
|
|
|
|
int xmxg(); //按姓名修改
|
|
|
|
|
int xmxg(); //按姓名修改
|
|
|
|
|
int back();
|
|
|
|
|
|
|
|
|
|
struct worker wo[100]; //保存所有职工信息
|
|
|
|
@ -114,7 +114,7 @@ int see() //
|
|
|
|
|
{
|
|
|
|
|
int i=0;
|
|
|
|
|
printf("以下是全部员工\n");
|
|
|
|
|
printf("\t姓名\t工号\t基本工资\t职务工资\t工作补贴\n");
|
|
|
|
|
printf("\t工号\t姓名\t基本工资\t职务工资\t工作补贴\n");
|
|
|
|
|
while(i<number)
|
|
|
|
|
{
|
|
|
|
|
printf("\t%s\t%s\t%d\t%d\t%d\n",wo[i].id,wo[i].name,wo[i].salary1,wo[i].salary2,wo[i].salary3);
|
|
|
|
@ -143,11 +143,13 @@ int xmcz() //
|
|
|
|
|
printf("请输入要查找的职工姓名:");
|
|
|
|
|
scanf("%s",name);
|
|
|
|
|
system("cls");
|
|
|
|
|
printf("\t姓名\t工号\t基本工资\t职务工资\t工作补贴\n");
|
|
|
|
|
printf("\t工号\t姓名\t基本工资\t职务工资\t工作补贴\n");
|
|
|
|
|
for(i=0;i<number;i++)
|
|
|
|
|
{
|
|
|
|
|
if(strcmp(name,wo[i].name)==0)
|
|
|
|
|
printf("\t%s\t%s\t%d\t%d\t%d\n",wo[i].id,wo[i].name,wo[i].salary1,wo[i].salary2,wo[i].salary3);
|
|
|
|
|
else
|
|
|
|
|
printf("输入有误!\n");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -158,11 +160,13 @@ int ghcz() //
|
|
|
|
|
printf("请输入要查找的职工工号:");
|
|
|
|
|
scanf("%s",id);
|
|
|
|
|
system("cls");
|
|
|
|
|
printf("\t姓名\t工号\t基本工资\t职务工资\t工作补贴\n");
|
|
|
|
|
printf("\t工号\t姓名\t基本工资\t职务工资\t工作补贴\n");
|
|
|
|
|
for(i=0;i<number;i++)
|
|
|
|
|
{
|
|
|
|
|
if(strcmp(id,wo[i].id)==0)
|
|
|
|
|
printf("\t%s\t%s\t%d\t%d\t%d\n",wo[i].id,wo[i].name,wo[i].salary1,wo[i].salary2,wo[i].salary3);
|
|
|
|
|
else
|
|
|
|
|
printf("输入有误!\n") ;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -193,7 +197,9 @@ int xmsc() //
|
|
|
|
|
{
|
|
|
|
|
for(j=i;j<number-1;j++)
|
|
|
|
|
{wo[j]=wo[j+1];}number--;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
printf("输入有误!\n") ;
|
|
|
|
|
}
|
|
|
|
|
fp=fopen("C://woker.dat","wb"); //将剩余的数据写入文件 ,删除以前的数据
|
|
|
|
|
for(i=0;i<number;i++)
|
|
|
|
@ -217,7 +223,9 @@ int ghsc() //
|
|
|
|
|
{
|
|
|
|
|
for(j=i;j<number-1;j++)
|
|
|
|
|
{wo[j]=wo[j+1];}number--;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
printf("输入有误!\n") ;
|
|
|
|
|
}
|
|
|
|
|
fp=fopen("C://woker.dat","wb"); //将剩余的数据写入文件 ,删除以前的数据
|
|
|
|
|
for(i=0;i<number;i++)
|
|
|
|
@ -273,7 +281,7 @@ int xmxg() //
|
|
|
|
|
else
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
printf("\t姓名\t工号\t基本工资\t职务工资\t工作补贴\n");
|
|
|
|
|
printf("\t工号\t姓名\t基本工资\t职务工资\t工作补贴\n");
|
|
|
|
|
printf("\t%s\t%s\t%d\t%d\t%d\n",wo[i].id,wo[i].name,wo[i].salary1,wo[i].salary2,wo[i].salary3);
|
|
|
|
|
printf("请重新输入该职员的信息");
|
|
|
|
|
printf("姓名:");
|
|
|
|
@ -305,7 +313,7 @@ int ghxg() //
|
|
|
|
|
else
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
printf("\t姓名\t工号\t基本工资\t职务工资\t工作补贴\n");
|
|
|
|
|
printf("\t工号\t姓名\t基本工资\t职务工资\t工作补贴\n");
|
|
|
|
|
printf("\t%s\t%s\t%d\t%d\t%d\n",wo[i].id,wo[i].name,wo[i].salary1,wo[i].salary2,wo[i].salary3);
|
|
|
|
|
printf("请重新输入该职员的信息");
|
|
|
|
|
printf("姓名:");
|
|
|
|
|