admin.c
上传用户:tamljx
上传日期:2021-06-04
资源大小:60k
文件大小:4k
- /*admin.c:家长管理功能选择界面,根据用户选项调用相应函数实现系统功能*/
- #include "shead.h"
- /*家庭成员财务信息头文件*/
- #include "creat.c"
- /*创建家庭成员财务信息文件*/
- #include "add.c"
- /*增加家庭成员财务信息记录*/
- #include "delete.c"
- /*删除家庭成员财务信息记录*/
- #include "modnum.c"
- /*按家庭成员序号修改家庭成员财务信息*/
- #include "qname.c"
- /*按家庭成员姓名查询家庭成员财务信息*/
- #include "qseatnum.c"
- /*按家庭成员序号查询家庭成员财务信息*/
- #include "ssum.c"
- /*按财务合计项排序浏览家庭成员财务信息*/
- void Admin()
- {
- int choice = 0; /*存放用户选项的变量*/
- /*====功能及操作的界面提示====*/
- while(1)
- {
- printf("--------------------------------------------------------n");
- printf("| |n");
- printf("| Welcome to Family Financial Management System |n");
- printf("| |n");
- printf("|------------------------------------------------------|n");
- printf("| 1. Creat Financial File |n");
- printf("| 2. AddRecord() |n");
- printf("| 3. DelRecord() |n");
- printf("| 4. QueryByName() |n");
- printf("| 5. QueryBySeatNum() |n");
- printf("| 6. ModifyByNumber() |n");
- printf("| 7. SortBySum() |n");
- printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++n");
- printf("| System User Management |n");
- printf("| 11.CreatNewUserFile() |n");
- printf("| 12.AddUser() |n");
- printf("| 13.DelUser() |n");
- printf("| 14.ModifyUser() |n");
- printf("| 15.SortByUserNum() |n");
- printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++n");
- printf("| 0. End Program |n");
- printf("--------------------------------------------------------n");
- printf("# Please Input Your Choose #n");
- printf("# number 1~7 to Manage the Family's Finance #n");
- printf("# number 11,12,13,14,15 to Manage the System User #n");
- printf("# number 0 to Exit the System #n");
- printf("--------------------------------------------------------n");
- scanf("%d",&choice);
- getchar();
- /*根据用户选项调用相应函数*/
- switch(choice)
- {
- case 1:
- CreatFile();/*创建初始财务信息文件*/
- break;
- case 2:
- AddRecord();/*增加财务信息记录*/
- break;
- case 3:
- DelRecord();/*修改财务信息记录*/
- break;
- case 4:
- QueryByName();/*按家庭成员姓名查询财务信息*/
- break;
- case 5:
- QueryBySeatNum();/*按家庭成员序号查询财务信息*/
- break;
- case 6:
- ModifyByNumber();/*按家庭成员序号修改财务信息*/
- break;
- case 7:
- SortBySum();/*按财务合计项排序浏览财务信息*/
- break;
- case 11:
- CreatUser();/*创建初始家庭成员信息文件*/
- break;
- case 12:
- AddUser();/*增加家庭成员*/
- break;
- case 13:
- DelUser();/*删除家庭成员*/
- break;
- case 14:
- ModifyByUserNumber();/*按家庭成员序号修改家庭成员*/
- break;
- case 15:
- SortByUserNum();/*按家庭成员序号排序浏览*/
- break;
- case 0:
- exit(0);/*退出系统*/
- default:
- break;
- }
- }
- }