admin.c
上传用户:tamljx
上传日期:2021-06-04
资源大小:60k
文件大小:4k
源码类别:

家庭/个人应用

开发平台:

C/C++

  1. /*admin.c:家长管理功能选择界面,根据用户选项调用相应函数实现系统功能*/
  2. #include "shead.h"
  3. /*家庭成员财务信息头文件*/
  4. #include "creat.c"
  5. /*创建家庭成员财务信息文件*/
  6. #include "add.c"
  7. /*增加家庭成员财务信息记录*/
  8. #include "delete.c"
  9. /*删除家庭成员财务信息记录*/
  10. #include "modnum.c"
  11. /*按家庭成员序号修改家庭成员财务信息*/
  12. #include "qname.c"
  13. /*按家庭成员姓名查询家庭成员财务信息*/
  14. #include "qseatnum.c"
  15. /*按家庭成员序号查询家庭成员财务信息*/
  16. #include "ssum.c"
  17. /*按财务合计项排序浏览家庭成员财务信息*/
  18. void Admin()
  19. {
  20.     int choice = 0; /*存放用户选项的变量*/
  21.     /*====功能及操作的界面提示====*/
  22.     while(1)
  23.     {
  24.         printf("--------------------------------------------------------n");
  25.         printf("|                                                      |n");
  26.         printf("|     Welcome to Family Financial Management System    |n");
  27.         printf("|                                                      |n");
  28.         printf("|------------------------------------------------------|n");
  29.         printf("|           1. Creat Financial File                    |n");
  30.         printf("|           2. AddRecord()                             |n");
  31.         printf("|           3. DelRecord()                             |n");
  32.         printf("|           4. QueryByName()                           |n");
  33.         printf("|           5. QueryBySeatNum()                        |n");
  34.         printf("|           6. ModifyByNumber()                        |n");
  35.         printf("|           7. SortBySum()                             |n");
  36.         printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++n");
  37.         printf("|           System User Management                     |n");
  38.         printf("|           11.CreatNewUserFile()                      |n");
  39.         printf("|           12.AddUser()                               |n");
  40.         printf("|           13.DelUser()                               |n");
  41.         printf("|           14.ModifyUser()                            |n");
  42.         printf("|           15.SortByUserNum()                         |n");
  43.         printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++n");
  44.         printf("|           0. End Program                             |n");
  45.         printf("--------------------------------------------------------n");
  46.         printf("# Please Input Your Choose                             #n");
  47.         printf("# number 1~7 to Manage the Family's Finance            #n");
  48.         printf("# number 11,12,13,14,15 to Manage the System User      #n");
  49.         printf("# number 0 to Exit the System                          #n");
  50.         printf("--------------------------------------------------------n");
  51.         scanf("%d",&choice);
  52.         getchar();
  53.         /*根据用户选项调用相应函数*/
  54.         switch(choice)
  55.             {
  56.             case 1:
  57.                 CreatFile();/*创建初始财务信息文件*/
  58.                 break;
  59.             case 2:
  60.                 AddRecord();/*增加财务信息记录*/
  61.                 break;
  62.             case 3:
  63.                 DelRecord();/*修改财务信息记录*/
  64.                 break;
  65.             case 4:
  66.                 QueryByName();/*按家庭成员姓名查询财务信息*/
  67.                 break;
  68.             case 5:
  69.                 QueryBySeatNum();/*按家庭成员序号查询财务信息*/
  70.                 break;
  71.             case 6:
  72.                 ModifyByNumber();/*按家庭成员序号修改财务信息*/
  73.                 break;
  74.             case 7:
  75.                 SortBySum();/*按财务合计项排序浏览财务信息*/
  76.                 break;
  77.             case 11:
  78.                 CreatUser();/*创建初始家庭成员信息文件*/
  79.                 break;
  80.             case 12:
  81.                 AddUser();/*增加家庭成员*/
  82.                 break;
  83.             case 13:
  84.                 DelUser();/*删除家庭成员*/
  85.                 break;
  86.             case 14:
  87.                 ModifyByUserNumber();/*按家庭成员序号修改家庭成员*/
  88.                 break;
  89.             case 15:
  90.                 SortByUserNum();/*按家庭成员序号排序浏览*/
  91.                 break;
  92.             case 0:
  93.                 exit(0);/*退出系统*/
  94.             default:
  95.                 break;
  96.         }
  97.     }
  98. }