|
|
@ -114,7 +114,7 @@ int see() //
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int i=0;
|
|
|
|
int i=0;
|
|
|
|
printf("以下是全部员工\n");
|
|
|
|
printf("以下是全部员工\n");
|
|
|
|
printf("\t姓名\t工号\t基本工资\t职务工资\t工作补贴\n");
|
|
|
|
printf("\t工号\t姓名\t基本工资\t职务工资\t工作补贴\n");
|
|
|
|
while(i<number)
|
|
|
|
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);
|
|
|
|
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("请输入要查找的职工姓名:");
|
|
|
|
printf("请输入要查找的职工姓名:");
|
|
|
|
scanf("%s",name);
|
|
|
|
scanf("%s",name);
|
|
|
|
system("cls");
|
|
|
|
system("cls");
|
|
|
|
printf("\t姓名\t工号\t基本工资\t职务工资\t工作补贴\n");
|
|
|
|
printf("\t工号\t姓名\t基本工资\t职务工资\t工作补贴\n");
|
|
|
|
for(i=0;i<number;i++)
|
|
|
|
for(i=0;i<number;i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(strcmp(name,wo[i].name)==0)
|
|
|
|
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);
|
|
|
|
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("请输入要查找的职工工号:");
|
|
|
|
printf("请输入要查找的职工工号:");
|
|
|
|
scanf("%s",id);
|
|
|
|
scanf("%s",id);
|
|
|
|
system("cls");
|
|
|
|
system("cls");
|
|
|
|
printf("\t姓名\t工号\t基本工资\t职务工资\t工作补贴\n");
|
|
|
|
printf("\t工号\t姓名\t基本工资\t职务工资\t工作补贴\n");
|
|
|
|
for(i=0;i<number;i++)
|
|
|
|
for(i=0;i<number;i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(strcmp(id,wo[i].id)==0)
|
|
|
|
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);
|
|
|
|
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") ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -194,6 +198,8 @@ int xmsc() //
|
|
|
|
for(j=i;j<number-1;j++)
|
|
|
|
for(j=i;j<number-1;j++)
|
|
|
|
{wo[j]=wo[j+1];}number--;
|
|
|
|
{wo[j]=wo[j+1];}number--;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
printf("输入有误!\n") ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fp=fopen("C://woker.dat","wb"); //将剩余的数据写入文件 ,删除以前的数据
|
|
|
|
fp=fopen("C://woker.dat","wb"); //将剩余的数据写入文件 ,删除以前的数据
|
|
|
|
for(i=0;i<number;i++)
|
|
|
|
for(i=0;i<number;i++)
|
|
|
@ -218,6 +224,8 @@ int ghsc() //
|
|
|
|
for(j=i;j<number-1;j++)
|
|
|
|
for(j=i;j<number-1;j++)
|
|
|
|
{wo[j]=wo[j+1];}number--;
|
|
|
|
{wo[j]=wo[j+1];}number--;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
printf("输入有误!\n") ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fp=fopen("C://woker.dat","wb"); //将剩余的数据写入文件 ,删除以前的数据
|
|
|
|
fp=fopen("C://woker.dat","wb"); //将剩余的数据写入文件 ,删除以前的数据
|
|
|
|
for(i=0;i<number;i++)
|
|
|
|
for(i=0;i<number;i++)
|
|
|
@ -273,7 +281,7 @@ int xmxg() //
|
|
|
|
else
|
|
|
|
else
|
|
|
|
break;
|
|
|
|
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("\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("请重新输入该职员的信息");
|
|
|
|
printf("姓名:");
|
|
|
|
printf("姓名:");
|
|
|
@ -305,7 +313,7 @@ int ghxg() //
|
|
|
|
else
|
|
|
|
else
|
|
|
|
break;
|
|
|
|
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("\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("请重新输入该职员的信息");
|
|
|
|
printf("姓名:");
|
|
|
|
printf("姓名:");
|
|
|
|