C语言写疫情防控系统(easyx图形界面)
系统功能描述
管理员界面:
- 输入管理员账号、密码登录管理员界面。
- 对学生信息进行增、删、改、查,学生信息包括姓名、学号、密码、邮箱、电话、学院;对全体学生信息进行完全删除。
- 查看学生的疫情信息填报记录,包括健康信息(早、中、晚体温、是否咳嗽)、核酸检测信息(检测时间、检测结果)、疫苗接种信息(接种日期、接种型号)。
- 查询发烧学生(体温>37.3℃)、查询咳嗽学生,并在图形化界面显示结果。
- 按照学生体温从高到低进行排序,写入健康信息源文件并在图形化界面显示结果。
- 按照学生核酸检测次数从高到低排序,写入核酸检测信息源文件并在图形化界面显示结果。输入一个值,查看核酸检测次数小于该值的学生。
学生界面:
- 输入学生账号、密码登录该学生的界面。
- 对个人信息进行增、删、改、查,个人信息包括姓名、学号、密码、邮箱、电话、学院。
- 填报、修改个人健康信息状况,包括健康信息(早、中、晚体温、是否咳嗽)。
- 填报、修改个人核酸检测信息(检测时间、检测结果)。
- 填报、修改个人疫苗接种信息(接种日期、接种型号)。
程序说明
程序设计语言与运行环境:
- 本程序运行环境为Visual Studio 2022 Current,需要额外安装EasyX图形库 。
- 无需配置程序路径,直接运行yiqing.cpp即可。管理员账号:admin,密码:111。
文件组成说明:
- images文件夹存放图形界面背景图。
- StuPhoto存放学生照片,其文件名与该学生学号一致,文件后缀为.jpg。
- AdminSignIn.txt记录管理员的ID和密码。
- StudentInforFile.txt记录全体学生的ID和密码。
- HealthTile.txt、TestFile.txt、VaccineFile.txt、TestTimes.txt均为程序运行生成的,这几个文件与yiqing.cpp和yiqing.h在同一相对路径下。其中HealthTile.txt记录全体学生健康填报信息,TestFile.txt记录全体学生核酸检测信息,VaccineFile.txt记录全体学生疫苗接种信息,TestTimes.txt统计全体学生的核酸检测次数。
操作说明:
- 输入学号不超过9位,输入邮箱不超过15位。
- 程序运行前AdminSignIn.txt必须存在,用于管理员登录。其余的txt文件可以不存在,均可在程序中生成。
- 健康情况中是否咳嗽请填写(是/否),核酸检测结果请填写(阴/阳),同一日期填写格式请保持一致,例如只能用2022.01.01这一日期查找2022.01.01日期的填报结果,而不能使用2022/01/01查找。
- 学生信息、日期的填写格式可参考下图。
yiqing.cpp
#include"yiqing.h"
int NowStudentNums = 0;
int NowHealthNums = 0;
int NowTestNums = 0;
int NowVaccineNums = 0;
ADM AdminUser;
STU StuArry[n];
Health health[n];
Test test[n];
Vaccine vaccine[n];
void FirstPage() {
ReadInfor();
ReadHealth();
ReadTest();
ReadVaccine();
initgraph(760, 760);
MOUSEMSG m1;
cleardevice();
IMAGE picture1;
loadimage(&picture1, "images/firstbg1.png", 760, 760);
putimage(0, 0, &picture1);
setbkmode(TRANSPARENT);
setfillcolor(GREEN);
char FirstTitle[20] = { "疫情防控管理系统" };
settextstyle(60, 0, "宋体");
outtextxy(150, 100, FirstTitle);
fillrectangle(230, 445, 560, 490);
fillrectangle(230, 505, 560, 550);
fillrectangle(230, 565, 560, 610);
setbkmode(TRANSPARENT);
LOGFONT f;
gettextstyle(&f);
_tcscpy_s(f.lfFaceName, _T("宋体"));
f.lfQuality = ANTIALIASED_QUALITY;
f.lfHeight = 40;
settextstyle(&f);
char FirstSelect1[20] = { "管理员操作界面" };
char FirstSelect2[20] = { "学生操作界面" };
char FirstSelect3[20] = { "退出程序" };
RECT R[3] = { {230, 445, 560, 490},{230, 505, 560, 550},{230, 565, 560, 610} };
drawtext(FirstSelect1, &R[0], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect2, &R[1], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect3, &R[2], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
while (1) {
m1 = GetMouseMsg();
if (m1.x >= 230 && m1.x <= 560 && m1.y >= 445 && m1.y <= 490)
{
setlinecolor(RED);
rectangle(230, 445, 560, 490);
if (m1.uMsg == WM_LBUTTONDOWN) {
AdminSignIn();
}
}
else if (m1.x >= 230 && m1.x <= 560 && m1.y >= 505 && m1.y <= 550)
{
setlinecolor(RED);
rectangle(230, 505, 560, 550);
if (m1.uMsg == WM_LBUTTONDOWN) {
StuSignIn();
}
}
else if (m1.x >= 230 && m1.x <= 560 && m1.y >= 565 && m1.y <= 610)
{
setlinecolor(RED);
rectangle(230, 565, 560, 610);
if (m1.uMsg == WM_LBUTTONDOWN) {
exit(0);
}
}
else {
setlinecolor(WHITE);
rectangle(230, 445, 560, 490);
rectangle(230, 505, 560, 550);
rectangle(230, 565, 560, 610);
}
}
}
void ReadInfor() {
FILE* fp;
fopen_s(&fp, "StudentInforFile.txt", "r");
if (fp == NULL) {
return;
}
for (int i = 0; i < n; i++) {
fscanf_s(fp, "%s\t%s\t%s\t%s\t%s\t%s\n",
StuArry[i].ID, 10,
StuArry[i].name, len,
StuArry[i].password, len,
StuArry[i].email, len,
StuArry[i].phone, 15,
StuArry[i].faculty, len);
}
int FileStudentNums = 0;
for (int k = 0; k < n; k++) {
if (strlen(StuArry[k].name) != 0) {
NowStudentNums = ++FileStudentNums;
}
}
fclose(fp);
}
void AdminSignIn() {
FILE* fp;
fopen_s(&fp, "AdminSignIn.txt", "r");
if (fp == NULL) {
return;
}
fscanf_s(fp, "%s\t%s\n", AdminUser.name, len, AdminUser.password, len);
fclose(fp);
char ReceAcctNumber[64];
TCHAR InputAcct[] = _T("请输入用户名");
InputBox(ReceAcctNumber, 10, InputAcct);
char ReceAcctpassword[64];
TCHAR InputPass[] = _T("请输入密码");
InputBox(ReceAcctpassword, 10, InputPass);
if (strcmp(AdminUser.name, ReceAcctNumber) == 0 && strcmp(AdminUser.password, ReceAcctpassword) == 0) {
cleardevice();
AdminPage();
}
else {
HWND SignError = GetHWnd();
int isok = MessageBox(SignError, "用户名或密码错误!", "提示", MB_OK);
}
}
void AdminPage() {
initgraph(760, 760);
cleardevice();
MOUSEMSG m2;
cleardevice();
IMAGE picture1;
loadimage(&picture1, "images/firstbg.png", 760, 760);
putimage(0, 0, &picture1);
setfillcolor(GREEN);
setbkmode(TRANSPARENT);
char SecondTitle1[5] = { "管" };
char SecondTitle2[5] = { "理" };
char SecondTitle3[5] = { "员" };
char SecondTitle4[5] = { "操" };
char SecondTitle5[5] = { "作" };
char SecondTitle6[5] = { "界" };
char SecondTitle7[5] = { "面" };
fillrectangle(50, 145, 100, 565);
settextstyle(50, 0, "宋体");
outtextxy(50, 150, SecondTitle1);
outtextxy(50, 210, SecondTitle2);
outtextxy(50, 270, SecondTitle3);
outtextxy(50, 330, SecondTitle4);
outtextxy(50, 390, SecondTitle5);
outtextxy(50, 450, SecondTitle6);
outtextxy(50, 510, SecondTitle7);
setbkmode(TRANSPARENT);
fillrectangle(230, 90, 560, 135);
fillrectangle(230, 225, 560, 270);
fillrectangle(230, 360, 560, 405);
fillrectangle(230, 495, 560, 540);
fillrectangle(230, 630, 560, 675);
setbkmode(TRANSPARENT);
LOGFONT f;
gettextstyle(&f);
_tcscpy_s(f.lfFaceName, _T("宋体"));
f.lfQuality = ANTIALIASED_QUALITY;
f.lfHeight = 40;
settextstyle(&f);
char FirstSelect1[20] = { "学生信息管理" };
char FirstSelect2[20] = { "查看填报记录" };
char FirstSelect3[20] = { "健康状况异常学生" };
char FirstSelect4[20] = { "统计分析" };
char FirstSelect5[20] = { "返回" };
RECT R[5] = { {230, 90, 560, 135},{230, 225, 560, 270},{230, 360, 560, 405},{230, 495, 560, 540},{230, 630, 560, 675} };
drawtext(FirstSelect1, &R[0], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect2, &R[1], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect3, &R[2], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect4, &R[3], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect5, &R[4], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
while (1) {
m2 = GetMouseMsg();
if (m2.x >= 230 && m2.x <= 560 && m2.y >= 90 && m2.y <= 135) {
setlinecolor(RED);
rectangle(230, 90, 560, 135);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
StuInfo();
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 225 && m2.y <= 270) {
setlinecolor(RED);
rectangle(230, 225, 560, 270);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
StuRecord();
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 360 && m2.y <= 405) {
setlinecolor(RED);
rectangle(230, 360, 560, 405);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
StuProblem();
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 495 && m2.y <= 540) {
setlinecolor(RED);
rectangle(230, 495, 560, 540);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
StuAnalyse();
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 630 && m2.y <= 675) {
setlinecolor(RED);
rectangle(230, 630, 560, 675);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
FirstPage();
}
}
else {
setlinecolor(WHITE);
rectangle(230, 90, 560, 135);
rectangle(230, 225, 560, 270);
rectangle(230, 360, 560, 405);
rectangle(230, 495, 560, 540);
rectangle(230, 630, 560, 675);
}
}
}
void StuInfo() {
MOUSEMSG SL;
initgraph(760, 760);
cleardevice();
IMAGE picture2;
loadimage(&picture2, "images/secondbg.png", 760, 760);
putimage(0, 0, &picture2);
setbkmode(TRANSPARENT);
setfillcolor(GREEN);
char SecondTitle1[5] = { "管" };
char SecondTitle2[5] = { "理" };
char SecondTitle3[5] = { "员" };
char SecondTitle4[5] = { "操" };
char SecondTitle5[5] = { "作" };
char SecondTitle6[5] = { "界" };
char SecondTitle7[5] = { "面" };
fillrectangle(50, 145, 100, 565);
settextstyle(50, 0, "宋体");
outtextxy(50, 150, SecondTitle1);
outtextxy(50, 210, SecondTitle2);
outtextxy(50, 270, SecondTitle3);
outtextxy(50, 330, SecondTitle4);
outtextxy(50, 390, SecondTitle5);
outtextxy(50, 450, SecondTitle6);
outtextxy(50, 510, SecondTitle7);
fillrectangle(300, 90, 460, 140);
fillrectangle(300, 190, 460, 240);
fillrectangle(300, 290, 460, 340);
fillrectangle(300, 390, 460, 440);
fillrectangle(300, 490, 460, 540);
fillrectangle(300, 590, 460, 640);
setbkmode(TRANSPARENT);
settextstyle(50, 0, "黑体");
outtextxy(330, 90, "添加");
outtextxy(330, 190, "删除");
outtextxy(330, 290, "查找");
outtextxy(330, 390, "修改");
outtextxy(330, 490, "清空");
outtextxy(330, 590, "返回");
while (1) {
SL = GetMouseMsg();
if (SL.x >= 300 && SL.x <= 460 && SL.y >= 90 && SL.y <= 140) {
setlinecolor(RED);
rectangle(300, 90, 460, 140);
if (SL.uMsg == WM_LBUTTONDOWN) {
InputInfor();
cleardevice();
StuInfo();
}
}
else if (SL.x >= 300 && SL.x <= 460 && SL.y >= 190 && SL.y <= 240) {
setlinecolor(RED);
rectangle(300, 190, 460, 240);
if (SL.uMsg == WM_LBUTTONDOWN) {
DeSomeStu();
StuInfo();
}
}
else if (SL.x >= 300 && SL.x <= 460 && SL.y >= 290 && SL.y <= 340) {
setlinecolor(RED);
rectangle(300, 290, 460, 340);
if (SL.uMsg == WM_LBUTTONDOWN) {
FindInfo();
StuInfo();
}
}
else if (SL.x >= 300 && SL.x <= 460 && SL.y >= 390 && SL.y <= 440) {
setlinecolor(RED);
rectangle(300, 390, 460, 440);
if (SL.uMsg == WM_LBUTTONDOWN) {
ModifyStudInfor();
StuInfo();
}
}
else if (SL.x >= 300 && SL.x <= 460 && SL.y >= 490 && SL.y <= 540) {
setlinecolor(RED);
rectangle(300, 490, 460, 540);
if (SL.uMsg == WM_LBUTTONDOWN) {
HWND hwndDel = GetHWnd();
int isok = MessageBox(hwndDel, "确认清空?", "提示", MB_OKCANCEL);
if (isok == IDOK) {
DeleteStuInfor();
StuInfo();
int tips1 = MessageBox(hwndDel, "清空成功!", "提示", MB_OK);
}
else if (isok == IDCANCEL) {
}
}
}
else if (SL.x >= 300 && SL.x <= 460 && SL.y >= 590 && SL.y <= 640) {
setlinecolor(RED);
rectangle(300, 590, 460, 640);
if (SL.uMsg == WM_LBUTTONDOWN) {
cleardevice();
AdminPage();
}
}
else {
setlinecolor(WHITE);
rectangle(300, 90, 460, 140);
rectangle(300, 190, 460, 240);
rectangle(300, 290, 460, 340);
rectangle(300, 390, 460, 440);
rectangle(300, 490, 460, 540);
rectangle(300, 590, 460, 640);
}
}
}
void InputInfor() {
while (1) {
TCHAR InputWindow0[] = _T("请输入该学生的学号");
InputBox(StuArry[NowStudentNums].ID, 9, InputWindow0);
int FlagInput2 = 0;
int nums = strlen(StuArry[NowStudentNums].ID);
for (int i = 0; i < nums; i++) {
if (StuArry[NowStudentNums].ID[i] < '0' || StuArry[NowStudentNums].ID[i] > '9')
{
FlagInput2 = 1;
HWND hwndInput2 = GetHWnd();
int isok = MessageBox(hwndInput2, "输入格式有误,请重新输入", "提示", MB_OK);
break;
}
}
if (FlagInput2 == 0) {
int FlagInput1 = 0;
for (int i = 0; i < NowStudentNums; i++) {
if (strcmp(StuArry[NowStudentNums].ID, StuArry[i].ID) == 0) {
FlagInput1 = 1;
}
}
if (FlagInput1 == 1) {
HWND hwndInput1 = GetHWnd();
int isok = MessageBox(hwndInput1, "该学生已经存在,请重新输入", "提示", MB_OK);
}
if (FlagInput1 == 0) {
break;
}
}
}
TCHAR InputWindow1[] = _T("请输入该学生的姓名");
InputBox(StuArry[NowStudentNums].name, 10, InputWindow1);
TCHAR InputWindow2[] = _T("请输入该学生的密码");
InputBox(StuArry[NowStudentNums].password, 10, InputWindow2);
TCHAR InputWindow3[] = _T("请输入该学生的邮箱");
InputBox(StuArry[NowStudentNums].email, 20, InputWindow3);
TCHAR InputWindow4[] = _T("请输入该学生的电话");
InputBox(StuArry[NowStudentNums].phone, 20, InputWindow4);
TCHAR InputWindow5[] = _T("请输入该学生的学院");
InputBox(StuArry[NowStudentNums].faculty, 10, InputWindow5);
SaveInfor();
}
void SaveInfor() {
if (strlen(StuArry[NowStudentNums].ID) != 0 && strlen(StuArry[NowStudentNums].name) != 0) {
FILE* fp;
fopen_s(&fp, "StudentInforFile.txt", "a");
if (fp == NULL) {
return;
}
fprintf(fp, "%-10s\t%-8s\t%-10s\t%-15s\t%-15s\t%-10s\n",
StuArry[NowStudentNums].ID,
StuArry[NowStudentNums].name,
StuArry[NowStudentNums].password,
StuArry[NowStudentNums].email,
StuArry[NowStudentNums].phone,
StuArry[NowStudentNums].faculty);
fclose(fp);
NowStudentNums++;
}
}
int ReturnPosi() {
char ReceInput[64];
TCHAR InputWindowFI[] = _T("请输入学号或者姓名以进行查找/修改/删除");
InputBox(ReceInput, 10, InputWindowFI);
for (int w = 0; w < NowStudentNums; w++) {
if (strcmp(StuArry[w].name, ReceInput) == 0 || strcmp(StuArry[w].ID, ReceInput) == 0)
{
return w;
}
}
return -1;
}
void FindInfo() {
int TempPosi = ReturnPosi();
if (TempPosi == -1)
{
HWND hndtipsF = GetHWnd();
int isok = MessageBox(hndtipsF, "查无此人!", "提示", MB_OK);
}
else
{
cleardevice();
PrintFindInfor(TempPosi);
}
}
void PrintFindInfor(int Position) {
MOUSEMSG PFI;
initgraph(600, 360);
cleardevice();
IMAGE picture2;
loadimage(&picture2, "images/secondbg.png", 600, 360);
putimage(0, 0, &picture2);
setfillcolor(GREEN);
fillrectangle(420, 315, 580, 345);
fillrectangle(20, 15, 350, 45);
fillrectangle(20, 75, 350, 105);
fillrectangle(20, 135, 350, 165);
fillrectangle(20, 195, 350, 225);
fillrectangle(20, 255, 350, 285);
fillrectangle(20, 315, 350, 345);
setbkmode(TRANSPARENT);
LOGFONT f;
gettextstyle(&f);
_tcscpy_s(f.lfFaceName, _T("楷体"));
f.lfQuality = ANTIALIASED_QUALITY;
f.lfHeight = 30;
settextstyle(&f);
outtextxy(25, 15, "学号:");
outtextxy(25, 75, "姓名:");
outtextxy(25, 135, "密码:");
outtextxy(25, 195, "邮箱:");
outtextxy(25, 255, "电话:");
outtextxy(25, 315, "学院:");
outtextxy(470, 315, "返回");
outtextxy(100, 15, StuArry[Position].ID);
outtextxy(100, 75, StuArry[Position].name);
outtextxy(100, 135, StuArry[Position].password);
outtextxy(100, 195, StuArry[Position].email);
outtextxy(100, 255, StuArry[Position].phone);
outtextxy(100, 315, StuArry[Position].faculty);
char path[20] = "StuPhoto/";
strcat_s(path, StuArry[Position].ID);
strcat_s(path, ".jpg");
IMAGE photo1;
loadimage(&photo1, path, 140, 210);
putimage(420, 15, &photo1);
setbkmode(TRANSPARENT);
while (1) {
PFI = GetMouseMsg();
if (PFI.x >= 420 && PFI.x <= 580 && PFI.y >= 315 && PFI.y <= 345) {
setlinecolor(RED);
rectangle(420, 315, 580, 345);
if (PFI.uMsg == WM_LBUTTONDOWN) {
cleardevice();
StuInfo();
}
}
else {
setlinecolor(WHITE);
rectangle(420, 315, 580, 345);
}
}
}
void DeSomeStu() {
int TempDelt = ReturnPosi();
if (TempDelt == -1)
{
HWND hndtipsD = GetHWnd();
int isok = MessageBox(hndtipsD, "查无此人!", "提示", MB_OK);
}
else
{
HWND hndtipsDS = GetHWnd();
int isok = MessageBox(hndtipsDS, "确定删除?", "提示", MB_OKCANCEL);
if (isok == IDOK) {
for (int d = TempDelt; d < NowStudentNums - 1; d++) {
StuArry[d] = StuArry[d + 1];
}
NowStudentNums--;
SaveInforModi();
}
else if (isok == IDCANCEL) {
}
}
}
void SaveInforModi() {
FILE* fp;
fopen_s(&fp, "StudentInforFile.txt", "w");
if (fp == NULL) {
return;
}
for (int i = 0; i < NowStudentNums; i++) {
if (strlen(StuArry[i].ID) != 0 && strlen(StuArry[i].name) != 0) {
fprintf(fp, "%-10s\t%-8s\t%-10s\t%-15s\t%-15s\t%-10s\n",
StuArry[i].ID,
StuArry[i].name,
StuArry[i].password,
StuArry[i].email,
StuArry[i].phone,
StuArry[i].faculty);
}
}
fclose(fp);
}
void ModifyStudInfor() {
int TempModi = ReturnPosi();
if (TempModi == -1)
{
HWND hndtipsM = GetHWnd();
int isok = MessageBox(hndtipsM, "查无此人!", "提示", MB_OK);
}
else
{
cleardevice(); MOUSEMSG Modi;
initgraph(960, 760);
IMAGE picture2;
loadimage(&picture2, "images/secondbg.png", 960, 760);
putimage(0, 0, &picture2);
setfillcolor(GREEN);
fillrectangle(690, 590, 850, 640);
fillrectangle(10, 40, 950, 180);
fillrectangle(10, 240, 950, 380);
setbkmode(TRANSPARENT);
settextstyle(50, 0, "宋体");
outtextxy(40, 40, "修改前");
outtextxy(40, 240, "修改后");
settextstyle(30, 0, "宋体");
outtextxy(10, 100, "学号");
outtextxy(110, 100, "姓名");
outtextxy(220, 100, "密码");
outtextxy(320, 100, "邮箱");
outtextxy(560, 100, "电话");
outtextxy(800, 100, "学院");
outtextxy(740, 600, "返回");
outtextxy(10, 300, "学号");
outtextxy(110, 300, "姓名");
outtextxy(220, 300, "密码");
outtextxy(320, 300, "邮箱");
outtextxy(560, 300, "电话");
outtextxy(800, 300, "学院");
outtextxy(10, 140, StuArry[TempModi].ID);
outtextxy(110, 140, StuArry[TempModi].name);
outtextxy(220, 140, StuArry[TempModi].password);
outtextxy(320, 140, StuArry[TempModi].email);
outtextxy(560, 140, StuArry[TempModi].phone);
outtextxy(800, 140, StuArry[TempModi].faculty);
while (1) {
char TempModiNums[64];
TCHAR InputWindow0[] = _T("请输入该学生的学号");
InputBox(TempModiNums, 9, InputWindow0);
if (strcmp(TempModiNums, StuArry[TempModi].ID) == 0)
{
break;
}
else
{
int FlagInput3 = 0;
int nums = strlen(TempModiNums);
for (int i = 0; i < nums; i++) {
if (TempModiNums[i] < '0' || TempModiNums[i] > '9')
{
FlagInput3 = 1;
HWND hwndInput3 = GetHWnd();
int isok = MessageBox(hwndInput3, "输入格式有误,请重新输入", "提示", MB_OK);
break;
}
}
if (FlagInput3 == 0) {
int FlagInput4 = 0;
for (int i = 0; i < NowStudentNums; i++) {
if (strcmp(TempModiNums, StuArry[i].ID) == 0) {
FlagInput4 = 1;
break;
}
}
if (FlagInput4 == 1) {
HWND hwndInput4 = GetHWnd();
int isok = MessageBox(hwndInput4, "该学生已经存在,请重新输入", "提示", MB_OK);
}
else if (FlagInput4 == 0) {
memcpy(StuArry[TempModi].ID, TempModiNums, nums);
break;
}
}
}
}
TCHAR InputWindow1[] = _T("请输入该学生的姓名");
InputBox(StuArry[TempModi].name, 10, InputWindow1);
TCHAR InputWindow2[] = _T("请输入该学生的密码");
InputBox(StuArry[TempModi].password, 10, InputWindow2);
TCHAR InputWindow3[] = _T("请输入该学生的邮箱");
InputBox(StuArry[TempModi].email, 20, InputWindow3);
TCHAR InputWindow4[] = _T("请输入该学生的电话");
InputBox(StuArry[TempModi].phone, 20, InputWindow4);
TCHAR InputWindow5[] = _T("请输入该学生的学院");
InputBox(StuArry[TempModi].faculty, 10, InputWindow5);
outtextxy(10, 340, StuArry[TempModi].ID);
outtextxy(110, 340, StuArry[TempModi].name);
outtextxy(220, 340, StuArry[TempModi].password);
outtextxy(320, 340, StuArry[TempModi].email);
outtextxy(560, 340, StuArry[TempModi].phone);
outtextxy(800, 340, StuArry[TempModi].faculty);
if (strlen(StuArry[TempModi].name) != 0 && strlen(StuArry[TempModi].password) != 0 && strlen(StuArry[TempModi].email) != 0 &&
strlen(StuArry[TempModi].phone) != 0 && strlen(StuArry[TempModi].faculty) != 0) {
SaveInforModi();
}
else {
HWND SignError = GetHWnd();
int isok = MessageBox(SignError, "请勿输入空语句!", "提示", MB_OK);
}
while (1) {
Modi = GetMouseMsg();
if (Modi.x >= 690 && Modi.x <= 850 && Modi.y >= 590 && Modi.y <= 640) {
setlinecolor(RED);
setlinecolor(RED);
rectangle(690, 590, 850, 640);
if (Modi.uMsg == WM_LBUTTONDOWN) {
cleardevice();
StuInfo();
}
}
else {
setlinecolor(WHITE);
rectangle(690, 590, 850, 640);
}
}
}
}
void DeleteStuInfor() {
remove("StudentInforFile.txt");
NowStudentNums = 0;
}
void StuRecord() {
initgraph(760, 760);
cleardevice();
MOUSEMSG m2;
cleardevice();
IMAGE picture1;
loadimage(&picture1, "images/firstbg.png", 760, 760);
putimage(0, 0, &picture1);
setfillcolor(GREEN);
setbkmode(TRANSPARENT);
char SecondTitle1[5] = { "管" };
char SecondTitle2[5] = { "理" };
char SecondTitle3[5] = { "员" };
char SecondTitle4[5] = { "操" };
char SecondTitle5[5] = { "作" };
char SecondTitle6[5] = { "界" };
char SecondTitle7[5] = { "面" };
fillrectangle(50, 145, 100, 565);
settextstyle(50, 0, "宋体");
outtextxy(50, 150, SecondTitle1);
outtextxy(50, 210, SecondTitle2);
outtextxy(50, 270, SecondTitle3);
outtextxy(50, 330, SecondTitle4);
outtextxy(50, 390, SecondTitle5);
outtextxy(50, 450, SecondTitle6);
outtextxy(50, 510, SecondTitle7);
setbkmode(TRANSPARENT);
fillrectangle(230, 90, 560, 135);
fillrectangle(230, 225, 560, 270);
fillrectangle(230, 360, 560, 405);
fillrectangle(230, 495, 560, 540);
setbkmode(TRANSPARENT);
LOGFONT f;
gettextstyle(&f);
_tcscpy_s(f.lfFaceName, _T("宋体"));
f.lfQuality = ANTIALIASED_QUALITY;
f.lfHeight = 40;
settextstyle(&f);
char FirstSelect1[20] = { "每日健康记录" };
char FirstSelect2[20] = { "核酸检测记录" };
char FirstSelect3[20] = { "疫苗接种记录" };
char FirstSelect4[20] = { "返回" };
RECT R[5] = { {230, 90, 560, 135},{230, 225, 560, 270},{230, 360, 560, 405},{230, 495, 560, 540} };
drawtext(FirstSelect1, &R[0], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect2, &R[1], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect3, &R[2], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect4, &R[3], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
while (1) {
m2 = GetMouseMsg();
if (m2.x >= 230 && m2.x <= 560 && m2.y >= 90 && m2.y <= 135) {
setlinecolor(RED);
rectangle(230, 90, 560, 135);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
ShowHealthRecord();
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 225 && m2.y <= 270) {
setlinecolor(RED);
rectangle(230, 225, 560, 270);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
ShowTestRecord();
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 360 && m2.y <= 405) {
setlinecolor(RED);
rectangle(230, 360, 560, 405);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
ShowVaccineRecord();
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 495 && m2.y <= 540) {
setlinecolor(RED);
rectangle(230, 495, 560, 540);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
AdminPage();
}
}
else {
setlinecolor(WHITE);
rectangle(230, 90, 560, 135);
rectangle(230, 225, 560, 270);
rectangle(230, 360, 560, 405);
rectangle(230, 495, 560, 540);
}
}
}
void ShowHealthRecord() {
cleardevice(); MOUSEMSG Modi;
initgraph(860, 760);
IMAGE picture2;
loadimage(&picture2, "images/secondbg.png", 860, 760);
putimage(0, 0, &picture2);
setfillcolor(GREEN);
fillrectangle(690, 590, 850, 640);
fillrectangle(8, 40, 850, 570);
setbkmode(TRANSPARENT);
settextstyle(30, 0, "宋体");
outtextxy(10, 40, "日期");
outtextxy(200, 40, "体温(早)");
outtextxy(340, 40, "体温(中)");
outtextxy(480, 40, "体温(晚)");
outtextxy(620, 40, "是否咳嗽");
outtextxy(740, 600, "返回");
char StuID[64];
TCHAR InputWindow0[] = _T("请输入您想查看的学生学号");
InputBox(StuID, 15, InputWindow0);
int y = 0;
for (int i = 0; i < NowHealthNums; i++) {
if (strcmp(health[i].ID, StuID) == 0) {
outtextxy(10, 80 + y, health[i].date);
outtextxy(200, 80 + y, health[i].temperature1);
outtextxy(260, 80 + y, "℃");
outtextxy(340, 80 + y, health[i].temperature2);
outtextxy(400, 80 + y, "℃");
outtextxy(480, 80 + y, health[i].temperature3);
outtextxy(540, 80 + y, "℃");
outtextxy(620, 80 + y, health[i].cough);
y += 35;
}
}
if (y == 0) {
HWND SignError = GetHWnd();
int isok = MessageBox(SignError, "没有此学生的健康信息!", "提示", MB_OK);
}
while (1) {
Modi = GetMouseMsg();
if (Modi.x >= 690 && Modi.x <= 850 && Modi.y >= 590 && Modi.y <= 640) {
setlinecolor(RED);
rectangle(690, 590, 850, 640);
if (Modi.uMsg == WM_LBUTTONDOWN) {
cleardevice();
StuRecord();
}
}
else {
setlinecolor(WHITE);
rectangle(690, 590, 850, 640);
}
}
}
void ShowTestRecord() {
cleardevice(); MOUSEMSG Modi;
initgraph(860, 760);
IMAGE picture2;
loadimage(&picture2, "images/secondbg.png", 860, 760);
putimage(0, 0, &picture2);
setfillcolor(GREEN);
fillrectangle(690, 590, 850, 640);
fillrectangle(8, 40, 850, 570);
setbkmode(TRANSPARENT);
settextstyle(30, 0, "宋体");
outtextxy(10, 40, "学号");
outtextxy(200, 40, "日期");
outtextxy(390, 40, "结果");
outtextxy(740, 600, "返回");
char StuID[64];
TCHAR InputWindow0[] = _T("请输入您想查看的学生学号");
InputBox(StuID, 15, InputWindow0);
int y = 0;
for (int i = 0; i < NowTestNums; i++) {
if (strcmp(test[i].ID, StuID) == 0) {
outtextxy(10, 80 + y, test[i].ID);
outtextxy(200, 80 + y, test[i].date);
outtextxy(390, 80 + y, test[i].result);
y += 35;
}
}
if (y == 0) {
HWND SignError = GetHWnd();
int isok = MessageBox(SignError, "没有此学生的核酸检测信息!", "提示", MB_OK);
}
while (1) {
Modi = GetMouseMsg();
if (Modi.x >= 690 && Modi.x <= 850 && Modi.y >= 590 && Modi.y <= 640) {
setlinecolor(RED);
rectangle(690, 590, 850, 640);
if (Modi.uMsg == WM_LBUTTONDOWN) {
cleardevice();
StuRecord();
}
}
else {
setlinecolor(WHITE);
rectangle(690, 590, 850, 640);
}
}
}
void ShowVaccineRecord() {
cleardevice(); MOUSEMSG Modi;
initgraph(860, 760);
IMAGE picture2;
loadimage(&picture2, "images/secondbg.png", 860, 760);
putimage(0, 0, &picture2);
setfillcolor(GREEN);
fillrectangle(690, 590, 850, 640);
fillrectangle(8, 40, 850, 570);
setbkmode(TRANSPARENT);
settextstyle(30, 0, "宋体");
outtextxy(10, 40, "学号");
outtextxy(200, 40, "日期");
outtextxy(390, 40, "型号");
outtextxy(740, 600, "返回");
char StuID[64];
TCHAR InputWindow0[] = _T("请输入您想查看的学生学号");
InputBox(StuID, 15, InputWindow0);
int y = 0;
for (int i = 0; i < NowVaccineNums; i++) {
if (strcmp(vaccine[i].ID, StuID) == 0) {
outtextxy(10, 80 + y, vaccine[i].ID);
outtextxy(200, 80 + y, vaccine[i].date);
outtextxy(390, 80 + y, vaccine[i].type);
y += 35;
}
}
if (y == 0) {
HWND SignError = GetHWnd();
int isok = MessageBox(SignError, "没有此学生的疫苗接种信息!", "提示", MB_OK);
}
while (1) {
Modi = GetMouseMsg();
if (Modi.x >= 690 && Modi.x <= 850 && Modi.y >= 590 && Modi.y <= 640) {
setlinecolor(RED);
rectangle(690, 590, 850, 640);
if (Modi.uMsg == WM_LBUTTONDOWN) {
cleardevice();
StuRecord();
}
}
else {
setlinecolor(WHITE);
rectangle(690, 590, 850, 640);
}
}
}
void StuProblem() {
initgraph(760, 760);
cleardevice();
MOUSEMSG m2;
cleardevice();
IMAGE picture1;
loadimage(&picture1, "images/firstbg.png", 760, 760);
putimage(0, 0, &picture1);
setfillcolor(GREEN);
setbkmode(TRANSPARENT);
char SecondTitle1[5] = { "管" };
char SecondTitle2[5] = { "理" };
char SecondTitle3[5] = { "员" };
char SecondTitle4[5] = { "操" };
char SecondTitle5[5] = { "作" };
char SecondTitle6[5] = { "界" };
char SecondTitle7[5] = { "面" };
fillrectangle(50, 145, 100, 565);
settextstyle(50, 0, "宋体");
outtextxy(50, 150, SecondTitle1);
outtextxy(50, 210, SecondTitle2);
outtextxy(50, 270, SecondTitle3);
outtextxy(50, 330, SecondTitle4);
outtextxy(50, 390, SecondTitle5);
outtextxy(50, 450, SecondTitle6);
outtextxy(50, 510, SecondTitle7);
setbkmode(TRANSPARENT);
fillrectangle(230, 90, 560, 135);
fillrectangle(230, 225, 560, 270);
fillrectangle(230, 360, 560, 405);
setbkmode(TRANSPARENT);
LOGFONT f;
gettextstyle(&f);
_tcscpy_s(f.lfFaceName, _T("宋体"));
f.lfQuality = ANTIALIASED_QUALITY;
f.lfHeight = 40;
settextstyle(&f);
char FirstSelect1[len] = { "体温异常的学生" };
char FirstSelect2[20] = { "有咳嗽状况的学生" };
char FirstSelect3[20] = { "返回" };
RECT R[3] = { {230, 90, 560, 135},{230, 225, 560, 270},{230, 360, 560, 405} };
drawtext(FirstSelect1, &R[0], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect2, &R[1], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect3, &R[2], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
while (1) {
m2 = GetMouseMsg();
if (m2.x >= 230 && m2.x <= 560 && m2.y >= 90 && m2.y <= 135) {
setlinecolor(RED);
rectangle(230, 90, 560, 135);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
ShowFeverStudent();
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 225 && m2.y <= 270) {
setlinecolor(RED);
rectangle(230, 225, 560, 270);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
ShowCoughStudent();
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 360 && m2.y <= 405) {
setlinecolor(RED);
rectangle(230, 360, 560, 405);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
AdminPage();
}
}
else {
setlinecolor(WHITE);
rectangle(230, 90, 560, 135);
rectangle(230, 225, 560, 270);
rectangle(230, 360, 560, 405);
}
}
}
void ShowFeverStudent() {
cleardevice(); MOUSEMSG Modi;
initgraph(860, 760);
IMAGE picture2;
loadimage(&picture2, "images/secondbg.png", 860, 760);
putimage(0, 0, &picture2);
setfillcolor(GREEN);
fillrectangle(690, 590, 850, 640);
fillrectangle(8, 40, 850, 570);
setbkmode(TRANSPARENT);
settextstyle(30, 0, "宋体");
outtextxy(10, 40, "学号");
outtextxy(200, 40, "日期");
outtextxy(390, 40, "发烧时段");
outtextxy(740, 600, "返回");
int y = 0;
for (int i = 0; i < NowHealthNums; i++) {
if (atof(health[i].temperature1) > 37.3) {
outtextxy(10, 80 + y, health[i].ID);
outtextxy(200, 80 + y, health[i].date);
outtextxy(390, 80 + y, "早上发烧");
y += 35;
}
if (atof(health[i].temperature2) > 37.3) {
outtextxy(10, 80 + y, health[i].ID);
outtextxy(200, 80 + y, health[i].date);
outtextxy(390, 80 + y, "中午发烧");
y += 35;
}
if (atof(health[i].temperature3) > 37.3) {
outtextxy(10, 80 + y, health[i].ID);
outtextxy(200, 80 + y, health[i].date);
outtextxy(390, 80 + y, "晚上发烧");
y += 35;
}
}
if (y == 0) {
HWND SignError = GetHWnd();
int isok = MessageBox(SignError, "没有同学发烧!", "提示", MB_OK);
}
while (1) {
Modi = GetMouseMsg();
if (Modi.x >= 690 && Modi.x <= 850 && Modi.y >= 590 && Modi.y <= 640) {
setlinecolor(RED);
rectangle(690, 590, 850, 640);
if (Modi.uMsg == WM_LBUTTONDOWN) {
cleardevice();
StuProblem();
}
}
else {
setlinecolor(WHITE);
rectangle(690, 590, 850, 640);
}
}
}
void ShowCoughStudent() {
cleardevice(); MOUSEMSG Modi;
initgraph(860, 760);
IMAGE picture2;
loadimage(&picture2, "images/secondbg.png", 860, 760);
putimage(0, 0, &picture2);
setfillcolor(GREEN);
fillrectangle(690, 590, 850, 640);
fillrectangle(8, 40, 850, 570);
setbkmode(TRANSPARENT);
settextstyle(30, 0, "宋体");
outtextxy(10, 40, "学号");
outtextxy(200, 40, "日期");
outtextxy(390, 40, "是否咳嗽");
outtextxy(740, 600, "返回");
int y = 0;
for (int i = 0; i < NowHealthNums; i++) {
if (strcmp(health[i].cough, "是") == 0) {
outtextxy(10, 80 + y, health[i].ID);
outtextxy(200, 80 + y, health[i].date);
outtextxy(390, 80 + y, "是");
y += 35;
}
}
if (y == 0) {
HWND SignError = GetHWnd();
int isok = MessageBox(SignError, "没有同学有咳嗽症状!", "提示", MB_OK);
}
while (1) {
Modi = GetMouseMsg();
if (Modi.x >= 690 && Modi.x <= 850 && Modi.y >= 590 && Modi.y <= 640) {
setlinecolor(RED);
rectangle(690, 590, 850, 640);
if (Modi.uMsg == WM_LBUTTONDOWN) {
cleardevice();
StuProblem();
}
}
else {
setlinecolor(WHITE);
rectangle(690, 590, 850, 640);
}
}
}
void StuAnalyse() {
initgraph(760, 760);
cleardevice();
MOUSEMSG m2;
cleardevice();
IMAGE picture1;
loadimage(&picture1, "images/firstbg.png", 760, 760);
putimage(0, 0, &picture1);
setfillcolor(GREEN);
setbkmode(TRANSPARENT);
char SecondTitle1[5] = { "管" };
char SecondTitle2[5] = { "理" };
char SecondTitle3[5] = { "员" };
char SecondTitle4[5] = { "操" };
char SecondTitle5[5] = { "作" };
char SecondTitle6[5] = { "界" };
char SecondTitle7[5] = { "面" };
fillrectangle(50, 145, 100, 565);
settextstyle(50, 0, "宋体");
outtextxy(50, 150, SecondTitle1);
outtextxy(50, 210, SecondTitle2);
outtextxy(50, 270, SecondTitle3);
outtextxy(50, 330, SecondTitle4);
outtextxy(50, 390, SecondTitle5);
outtextxy(50, 450, SecondTitle6);
outtextxy(50, 510, SecondTitle7);
setbkmode(TRANSPARENT);
fillrectangle(230, 90, 560, 135);
fillrectangle(230, 225, 560, 270);
fillrectangle(230, 360, 560, 405);
fillrectangle(230, 495, 560, 540);
setbkmode(TRANSPARENT);
LOGFONT f;
gettextstyle(&f);
_tcscpy_s(f.lfFaceName, _T("宋体"));
f.lfQuality = ANTIALIASED_QUALITY;
f.lfHeight = 40;
settextstyle(&f);
char FirstSelect1[20] = { "降序排列学生体温" };
char FirstSelect2[20] = { "降序排列核酸次数" };
char FirstSelect3[20] = { "核酸次数排查" };
char FirstSelect4[20] = { "返回" };
RECT R[5] = { {230, 90, 560, 135},{230, 225, 560, 270},{230, 360, 560, 405},{230, 495, 560, 540} };
drawtext(FirstSelect1, &R[0], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect2, &R[1], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect3, &R[2], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect4, &R[3], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
while (1) {
m2 = GetMouseMsg();
if (m2.x >= 230 && m2.x <= 560 && m2.y >= 90 && m2.y <= 135) {
setlinecolor(RED);
rectangle(230, 90, 560, 135);
if (m2.uMsg == WM_LBUTTONDOWN) {
SortTemperature();
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 225 && m2.y <= 270) {
setlinecolor(RED);
rectangle(230, 225, 560, 270);
if (m2.uMsg == WM_LBUTTONDOWN) {
SortTest();
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 360 && m2.y <= 405) {
setlinecolor(RED);
rectangle(230, 360, 560, 405);
if (m2.uMsg == WM_LBUTTONDOWN) {
CheckTestTimes();
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 495 && m2.y <= 540) {
setlinecolor(RED);
rectangle(230, 495, 560, 540);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
AdminPage();
}
}
else {
setlinecolor(WHITE);
rectangle(230, 90, 560, 135);
rectangle(230, 225, 560, 270);
rectangle(230, 360, 560, 405);
rectangle(230, 495, 560, 540);
}
}
}
void SortTemperature() {
char ReceAcctNumber[64];
TCHAR InputAcct[] = _T("请输入:1.按上午体温排序;2.按下午体温排序;3.按晚上体温排序");
InputBox(ReceAcctNumber, 10, InputAcct);
int flagSortTemprature = -1;
if (strcmp(ReceAcctNumber, "1") == 0) {
flagSortTemprature = 1;
for (int i = 0; i < NowHealthNums - 1; i++) {
for (int j = 0; j < NowHealthNums - i - 1; j++) {
if (atof(health[j].temperature1) < atof(health[j + 1].temperature1)) {
Health tempHealth;
tempHealth = health[j];
health[j] = health[j + 1];
health[j + 1] = tempHealth;
}
}
}
}
else if (strcmp(ReceAcctNumber, "2") == 0) {
flagSortTemprature = 2;
for (int i = 0; i < NowHealthNums - 1; i++) {
for (int j = 0; j < NowHealthNums - i - 1; j++) {
if (atof(health[j].temperature2) < atof(health[j + 1].temperature2)) {
Health tempHealth;
tempHealth = health[j];
health[j] = health[j + 1];
health[j + 1] = tempHealth;
}
}
}
}
else if (strcmp(ReceAcctNumber, "3") == 0) {
flagSortTemprature = 3;
for (int i = 0; i < NowHealthNums - 1; i++) {
for (int j = 0; j < NowHealthNums - i - 1; j++) {
if (atof(health[j].temperature3) < atof(health[j + 1].temperature3)) {
Health tempHealth;
tempHealth = health[j];
health[j] = health[j + 1];
health[j + 1] = tempHealth;
}
}
}
}
else {
HWND SignError = GetHWnd();
int isok = MessageBox(SignError, "请输入1/2/3以进行选择", "提示", MB_OK);
}
if (flagSortTemprature == 1) {
SaveModifyHealth();
HWND SignError1 = GetHWnd();
int isok = MessageBox(SignError1, "已按照上午体温进行排序", "提示", MB_OK);
}
else if (flagSortTemprature == 2) {
SaveModifyHealth();
HWND SignError2 = GetHWnd();
int isok = MessageBox(SignError2, "已按照中午体温进行排序", "提示", MB_OK);
}
else if (flagSortTemprature == 3) {
SaveModifyHealth();
HWND SignError3 = GetHWnd();
int isok = MessageBox(SignError3, "已按照晚上体温进行排序", "提示", MB_OK);
}
cleardevice(); MOUSEMSG Modi;
initgraph(960, 760);
IMAGE picture2;
loadimage(&picture2, "images/secondbg.png", 960, 760);
putimage(0, 0, &picture2);
setfillcolor(GREEN);
fillrectangle(690, 590, 850, 640);
fillrectangle(8, 40, 950, 570);
setbkmode(TRANSPARENT);
settextstyle(30, 0, "宋体");
outtextxy(10, 40, "ID");
outtextxy(110, 40, "日期");
outtextxy(350, 40, "体温(早)");
outtextxy(510, 40, "体温(中)");
outtextxy(670, 40, "体温(晚)");
outtextxy(830, 40, "是否咳嗽");
outtextxy(740, 600, "返回");
int y = 0;
for (int i = 0; i < 14; i++) {
outtextxy(10, 80 + y, health[i].ID);
outtextxy(110, 80 + y, health[i].date);
outtextxy(350, 80 + y, health[i].temperature1);
outtextxy(410, 80 + y, "℃");
outtextxy(510, 80 + y, health[i].temperature2);
outtextxy(570, 80 + y, "℃");
outtextxy(670, 80 + y, health[i].temperature3);
outtextxy(730, 80 + y, "℃");
outtextxy(830, 80 + y, health[i].cough);
y += 35;
}
if (y == 0) {
HWND SignError = GetHWnd();
int isok = MessageBox(SignError, "暂无体温记录!", "提示", MB_OK);
}
while (1) {
Modi = GetMouseMsg();
if (Modi.x >= 690 && Modi.x <= 850 && Modi.y >= 590 && Modi.y <= 640) {
setlinecolor(RED);
rectangle(690, 590, 850, 640);
if (Modi.uMsg == WM_LBUTTONDOWN) {
cleardevice();
StuAnalyse();
}
}
else {
setlinecolor(WHITE);
rectangle(690, 590, 850, 640);
}
}
}
void getTestTimes() {
for (int k = 0; k < NowStudentNums; k++) {
StuArry[k].TestTimes = 0;
for (int m = 0; m < NowTestNums; m++) {
if (strcmp(test[m].ID, StuArry[k].ID) == 0) {
StuArry[k].TestTimes++;
}
}
}
for (int i = 0; i < NowStudentNums - 1; i++) {
for (int j = 0; j < NowStudentNums - i - 1; j++) {
if (StuArry[j].TestTimes < StuArry[j + 1].TestTimes) {
STU tempstudent;
tempstudent = StuArry[j];
StuArry[j] = StuArry[j + 1];
StuArry[j + 1] = tempstudent;
}
}
}
FILE* fp;
fopen_s(&fp, "TestTimes.txt", "w");
if (fp == NULL) {
return;
}
for (int i = 0; i < NowStudentNums; i++) {
fprintf(fp, "%-10s\t%-10s\t%-5d\n",
StuArry[i].ID,
StuArry[i].name,
StuArry[i].TestTimes);
}
fclose(fp);
}
void SortTest() {
getTestTimes();
HWND SignError1 = GetHWnd();
int isok = MessageBox(SignError1, "已按照核酸检测次数生成文件", "提示", MB_OK);
cleardevice(); MOUSEMSG Modi;
initgraph(860, 760);
IMAGE picture2;
loadimage(&picture2, "images/secondbg.png", 860, 760);
putimage(0, 0, &picture2);
setfillcolor(GREEN);
fillrectangle(690, 590, 850, 640);
fillrectangle(8, 40, 850, 570);
setbkmode(TRANSPARENT);
settextstyle(30, 0, "宋体");
outtextxy(10, 40, "学号");
outtextxy(200, 40, "姓名");
outtextxy(390, 40, "核酸检测次数");
outtextxy(740, 600, "返回");
int y = 0;
for (int i = 0; i < NowStudentNums; i++) {
outtextxy(10, 80 + y, StuArry[i].ID);
outtextxy(200, 80 + y, StuArry[i].name);
char tempTestTimes[10];
_itoa_s(StuArry[i].TestTimes, tempTestTimes, 10);
outtextxy(390, 80 + y, tempTestTimes);
y += 35;
}
if (y == 0) {
HWND SignError = GetHWnd();
int isok = MessageBox(SignError, "暂无核酸检测记录!", "提示", MB_OK);
}
while (1) {
Modi = GetMouseMsg();
if (Modi.x >= 690 && Modi.x <= 850 && Modi.y >= 590 && Modi.y <= 640) {
setlinecolor(RED);
rectangle(690, 590, 850, 640);
if (Modi.uMsg == WM_LBUTTONDOWN) {
cleardevice();
StuAnalyse();
}
}
else {
setlinecolor(WHITE);
rectangle(690, 590, 850, 640);
}
}
}
void CheckTestTimes() {
getTestTimes();
char times[64];
TCHAR InputAcct[] = _T("您想找到核酸次数少于几次的学生?");
InputBox(times, 10, InputAcct);
cleardevice(); MOUSEMSG Modi;
initgraph(860, 760);
IMAGE picture2;
loadimage(&picture2, "images/secondbg.png", 860, 760);
putimage(0, 0, &picture2);
setfillcolor(GREEN);
fillrectangle(690, 590, 850, 640);
fillrectangle(8, 40, 850, 570);
setbkmode(TRANSPARENT);
settextstyle(30, 0, "宋体");
outtextxy(10, 40, "学号");
outtextxy(200, 40, "姓名");
outtextxy(390, 40, "核酸检测次数");
outtextxy(740, 600, "返回");
int y = 0;
for (int i = 0; i < NowStudentNums; i++) {
if (StuArry[i].TestTimes < atof(times)) {
outtextxy(10, 80 + y, StuArry[i].ID);
outtextxy(200, 80 + y, StuArry[i].name);
char tempTestTimes[10];
_itoa_s(StuArry[i].TestTimes, tempTestTimes, 10);
outtextxy(390, 80 + y, tempTestTimes);
y += 35;
}
}
if (y == 0) {
HWND SignError = GetHWnd();
int isok = MessageBox(SignError, "暂无满足要求的记录!", "提示", MB_OK);
}
while (1) {
Modi = GetMouseMsg();
if (Modi.x >= 690 && Modi.x <= 850 && Modi.y >= 590 && Modi.y <= 640) {
setlinecolor(RED);
rectangle(690, 590, 850, 640);
if (Modi.uMsg == WM_LBUTTONDOWN) {
cleardevice();
StuAnalyse();
}
}
else {
setlinecolor(WHITE);
rectangle(690, 590, 850, 640);
}
}
}
void StudentPage(int flagNowStu) {
initgraph(760, 760);
cleardevice();
MOUSEMSG m2;
cleardevice();
IMAGE picture1;
loadimage(&picture1, "images/firstbg.png", 760, 760);
putimage(0, 0, &picture1);
setfillcolor(GREEN);
setbkmode(TRANSPARENT);
char SecondTitle1[5] = { "学" };
char SecondTitle2[5] = { "生" };
char SecondTitle3[5] = { "用" };
char SecondTitle4[5] = { "户" };
char SecondTitle5[5] = { "操" };
char SecondTitle6[5] = { "作" };
char SecondTitle7[5] = { "界" };
char SecondTitle8[5] = { "面" };
fillrectangle(50, 145, 100, 625);
settextstyle(50, 0, "宋体");
outtextxy(50, 150, SecondTitle1);
outtextxy(50, 210, SecondTitle2);
outtextxy(50, 270, SecondTitle3);
outtextxy(50, 330, SecondTitle4);
outtextxy(50, 390, SecondTitle5);
outtextxy(50, 450, SecondTitle6);
outtextxy(50, 510, SecondTitle7);
outtextxy(50, 570, SecondTitle8);
setcolor(RED);
settextstyle(30, 0, "宋体");
char NowStuID[len] = "当前用户ID:";
strcat_s(NowStuID, StuArry[flagNowStu].ID);
outtextxy(450, 720, NowStuID);
setcolor(WHITE);
setbkmode(TRANSPARENT);
fillrectangle(230, 90, 560, 135);
fillrectangle(230, 225, 560, 270);
fillrectangle(230, 360, 560, 405);
fillrectangle(230, 495, 560, 540);
fillrectangle(230, 630, 560, 675);
setbkmode(TRANSPARENT);
LOGFONT f;
gettextstyle(&f);
_tcscpy_s(f.lfFaceName, _T("宋体"));
f.lfQuality = ANTIALIASED_QUALITY;
f.lfHeight = 40;
settextstyle(&f);
char FirstSelect1[20] = { "修改个人信息" };
char FirstSelect2[20] = { "每日健康记录" };
char FirstSelect3[20] = { "核酸检测记录" };
char FirstSelect4[20] = { "疫苗接种记录" };
char FirstSelect5[20] = { "返回" };
RECT R[5] = { {230, 90, 560, 135},{230, 225, 560, 270},{230, 360, 560, 405},{230, 495, 560, 540},{230, 630, 560, 675} };
drawtext(FirstSelect1, &R[0], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect2, &R[1], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect3, &R[2], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect4, &R[3], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect5, &R[4], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
while (1) {
m2 = GetMouseMsg();
if (m2.x >= 230 && m2.x <= 560 && m2.y >= 90 && m2.y <= 135) {
setlinecolor(RED);
rectangle(230, 90, 560, 135);
if (m2.uMsg == WM_LBUTTONDOWN) {
ModifyStudInfor2(flagNowStu);
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 225 && m2.y <= 270) {
setlinecolor(RED);
rectangle(230, 225, 560, 270);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
HealthRecord(flagNowStu);
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 360 && m2.y <= 405) {
setlinecolor(RED);
rectangle(230, 360, 560, 405);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
TestRecord(flagNowStu);
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 495 && m2.y <= 540) {
setlinecolor(RED);
rectangle(230, 495, 560, 540);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
VaccineRecord(flagNowStu);
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 630 && m2.y <= 675) {
setlinecolor(RED);
rectangle(230, 630, 560, 675);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
FirstPage();
}
}
else {
setlinecolor(WHITE);
rectangle(230, 90, 560, 135);
rectangle(230, 225, 560, 270);
rectangle(230, 360, 560, 405);
rectangle(230, 495, 560, 540);
rectangle(230, 630, 560, 675);
}
}
}
void StuSignIn() {
FILE* fp;
fopen_s(&fp, "StudentInforFile.txt", "r");
if (fp == NULL) {
return;
}
int flagNowStu = -1;
for (int i = 0; i < NowStudentNums; i++) {
fscanf_s(fp, "%s\t%s\t%s\t%s\t%s\t%s\n",
StuArry[i].ID, 10,
StuArry[i].name, len,
StuArry[i].password, len,
StuArry[i].email, len,
StuArry[i].phone, 15,
StuArry[i].faculty, len);
}
fclose(fp);
char ReceAcctNumber[64];
TCHAR InputAcct[] = _T("请输入学号");
InputBox(ReceAcctNumber, 10, InputAcct);
char ReceAcctpassword[64];
TCHAR InputPass[] = _T("请输入密码");
InputBox(ReceAcctpassword, 10, InputPass);
for (int j = 0; j < NowStudentNums; j++) {
if (strcmp(StuArry[j].ID, ReceAcctNumber) == 0 && strcmp(StuArry[j].password, ReceAcctpassword) == 0) {
cleardevice();
flagNowStu = j;
}
}
if (flagNowStu != -1) {
cleardevice();
StudentPage(flagNowStu);
}
else {
HWND SignError = GetHWnd();
int isok = MessageBox(SignError, "用户名或密码错误!", "提示", MB_OK);
}
}
void ModifyStudInfor2(int flagNowStu) {
cleardevice(); MOUSEMSG Modi;
initgraph(960, 760);
IMAGE picture2;
loadimage(&picture2, "images/secondbg.png", 960, 760);
putimage(0, 0, &picture2);
setfillcolor(GREEN);
fillrectangle(690, 590, 850, 640);
fillrectangle(10, 40, 950, 180);
fillrectangle(10, 240, 950, 380);
setbkmode(TRANSPARENT);
settextstyle(50, 0, "宋体");
outtextxy(40, 40, "修改前");
outtextxy(40, 240, "修改后");
settextstyle(30, 0, "宋体");
outtextxy(10, 100, "学号");
outtextxy(110, 100, "姓名");
outtextxy(220, 100, "密码");
outtextxy(320, 100, "邮箱");
outtextxy(560, 100, "电话");
outtextxy(800, 100, "学院");
outtextxy(740, 600, "返回");
outtextxy(10, 300, "学号");
outtextxy(110, 300, "姓名");
outtextxy(220, 300, "密码");
outtextxy(320, 300, "邮箱");
outtextxy(560, 300, "电话");
outtextxy(800, 300, "学院");
setcolor(RED);
settextstyle(30, 0, "宋体");
char NowStuID[len] = "当前用户ID:";
strcat_s(NowStuID, StuArry[flagNowStu].ID);
outtextxy(450, 720, NowStuID);
setcolor(WHITE);
outtextxy(10, 140, StuArry[flagNowStu].ID);
outtextxy(110, 140, StuArry[flagNowStu].name);
outtextxy(220, 140, StuArry[flagNowStu].password);
outtextxy(320, 140, StuArry[flagNowStu].email);
outtextxy(560, 140, StuArry[flagNowStu].phone);
outtextxy(800, 140, StuArry[flagNowStu].faculty);
while (1) {
char TempModiNums[64];
TCHAR InputWindow0[] = _T("请输入您的新学号");
InputBox(TempModiNums, 9, InputWindow0);
if (strcmp(TempModiNums, StuArry[flagNowStu].ID) == 0)
{
break;
}
else
{
int FlagInput3 = 0;
int nums = strlen(TempModiNums);
for (int i = 0; i < nums; i++) {
if (TempModiNums[i] < '0' || TempModiNums[i] > '9')
{
FlagInput3 = 1;
HWND hwndInput3 = GetHWnd();
int isok = MessageBox(hwndInput3, "输入格式有误,请重新输入", "提示", MB_OK);
break;
}
}
if (FlagInput3 == 0) {
int FlagInput4 = 0;
for (int i = 0; i < NowStudentNums; i++) {
if (strcmp(TempModiNums, StuArry[i].ID) == 0) {
FlagInput4 = 1;
break;
}
}
if (FlagInput4 == 1) {
HWND hwndInput4 = GetHWnd();
int isok = MessageBox(hwndInput4, "您输入的学号已经存在,请重新输入", "提示", MB_OK);
}
else if (FlagInput4 == 0) {
memcpy(StuArry[flagNowStu].ID, TempModiNums, 10);
break;
}
}
}
}
TCHAR InputWindow1[] = _T("请输入您的新姓名");
InputBox(StuArry[flagNowStu].name, 10, InputWindow1);
TCHAR InputWindow2[] = _T("请输入您的新密码");
InputBox(StuArry[flagNowStu].password, 10, InputWindow2);
TCHAR InputWindow3[] = _T("请输入您的新邮箱");
InputBox(StuArry[flagNowStu].email, 10, InputWindow3);
TCHAR InputWindow4[] = _T("请输入您的新电话");
InputBox(StuArry[flagNowStu].phone, 10, InputWindow4);
TCHAR InputWindow5[] = _T("请输入您的新学院");
InputBox(StuArry[flagNowStu].faculty, 10, InputWindow5);
outtextxy(10, 340, StuArry[flagNowStu].ID);
outtextxy(110, 340, StuArry[flagNowStu].name);
outtextxy(220, 340, StuArry[flagNowStu].password);
outtextxy(320, 340, StuArry[flagNowStu].email);
outtextxy(560, 340, StuArry[flagNowStu].phone);
outtextxy(800, 340, StuArry[flagNowStu].faculty);
if (strlen(StuArry[flagNowStu].name) != 0 && strlen(StuArry[flagNowStu].password) != 0 && strlen(StuArry[flagNowStu].email) != 0 &&
strlen(StuArry[flagNowStu].phone) != 0 && strlen(StuArry[flagNowStu].faculty) != 0) {
SaveInforModi();
}
else {
HWND SignError = GetHWnd();
int isok = MessageBox(SignError, "请勿输入空语句!", "提示", MB_OK);
}
while (1) {
Modi = GetMouseMsg();
if (Modi.x >= 690 && Modi.x <= 850 && Modi.y >= 590 && Modi.y <= 640) {
setlinecolor(RED);
setlinecolor(RED);
rectangle(690, 590, 850, 640);
if (Modi.uMsg == WM_LBUTTONDOWN) {
cleardevice();
StudentPage(flagNowStu);
}
}
else {
setlinecolor(WHITE);
rectangle(690, 590, 850, 640);
}
}
}
void HealthRecord(int flagNowStu) {
initgraph(760, 760);
cleardevice();
MOUSEMSG m2;
cleardevice();
IMAGE picture1;
loadimage(&picture1, "images/secondbg.png", 760, 760);
putimage(0, 0, &picture1);
setfillcolor(GREEN);
setbkmode(TRANSPARENT);
char SecondTitle1[5] = { "学" };
char SecondTitle2[5] = { "生" };
char SecondTitle3[5] = { "用" };
char SecondTitle4[5] = { "户" };
char SecondTitle5[5] = { "操" };
char SecondTitle6[5] = { "作" };
char SecondTitle7[5] = { "界" };
char SecondTitle8[5] = { "面" };
fillrectangle(50, 145, 100, 625);
settextstyle(50, 0, "宋体");
outtextxy(50, 150, SecondTitle1);
outtextxy(50, 210, SecondTitle2);
outtextxy(50, 270, SecondTitle3);
outtextxy(50, 330, SecondTitle4);
outtextxy(50, 390, SecondTitle5);
outtextxy(50, 450, SecondTitle6);
outtextxy(50, 510, SecondTitle7);
outtextxy(50, 570, SecondTitle8);
setbkmode(TRANSPARENT);
setcolor(RED);
settextstyle(30, 0, "宋体");
char NowStuID[len] = "当前用户ID:";
strcat_s(NowStuID, StuArry[flagNowStu].ID);
outtextxy(450, 720, NowStuID);
setcolor(WHITE);
fillrectangle(230, 160, 560, 200);
fillrectangle(230, 360, 560, 400);
fillrectangle(230, 560, 560, 600);
setbkmode(TRANSPARENT);
LOGFONT f;
gettextstyle(&f);
_tcscpy_s(f.lfFaceName, _T("宋体"));
f.lfQuality = ANTIALIASED_QUALITY;
f.lfHeight = 40;
settextstyle(&f);
char FirstSelect1[20] = { "添加健康情况" };
char FirstSelect2[20] = { "修改健康情况" };
char FirstSelect3[20] = { "返回" };
RECT R[3] = { {230, 160, 560, 200},{230, 360, 560, 400},{230, 560, 560, 600} };
drawtext(FirstSelect1, &R[0], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect2, &R[1], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect3, &R[2], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
while (1) {
m2 = GetMouseMsg();
if (m2.x >= 230 && m2.x <= 560 && m2.y >= 160 && m2.y <= 200) {
setlinecolor(RED);
rectangle(230, 160, 560, 200);
if (m2.uMsg == WM_LBUTTONDOWN) {
InputHealth(flagNowStu);
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 360 && m2.y <= 400) {
setlinecolor(RED);
rectangle(230, 360, 560, 400);
if (m2.uMsg == WM_LBUTTONDOWN) {
ModifyHealth(flagNowStu);
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 560 && m2.y <= 600) {
setlinecolor(RED);
rectangle(230, 560, 560, 600);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
StudentPage(flagNowStu);
}
}
else {
setlinecolor(WHITE);
rectangle(230, 160, 560, 200);
rectangle(230, 360, 560, 400);
rectangle(230, 560, 560, 600);
}
}
}
void InputHealth(int flagNowStu) {
char date[15];
TCHAR InputWindow0[] = _T("请输入填报的日期");
InputBox(date, 15, InputWindow0);
for (int i = 0; i < NowHealthNums; i++) {
if (strcmp(StuArry[flagNowStu].ID, health[i].ID) == 0 && strcmp(date, health[i].date) == 0) {
HWND hwndInput1 = GetHWnd();
int isok = MessageBox(hwndInput1, "你已经输入过健康信息,请使用修改功能", "提示", MB_OK);
HealthRecord(flagNowStu);
}
}
strcpy_s(health[NowHealthNums].ID, StuArry[flagNowStu].ID);
strcpy_s(health[NowHealthNums].date, date);
TCHAR InputWindow1[] = _T("请输入你早上的体温");
InputBox(health[NowHealthNums].temperature1, 10, InputWindow1);
TCHAR InputWindow2[] = _T("请输入你中午的体温");
InputBox(health[NowHealthNums].temperature2, 10, InputWindow2);
TCHAR InputWindow3[] = _T("请输入你晚上的体温");
InputBox(health[NowHealthNums].temperature3, 10, InputWindow3);
TCHAR InputWindow4[] = _T("请输入你是否咳嗽");
InputBox(health[NowHealthNums].cough, 10, InputWindow4);
if (strlen(health[NowHealthNums].date) != 0 && strlen(health[NowHealthNums].temperature1) != 0 && strlen(health[NowHealthNums].temperature2) != 0 &&
strlen(health[NowHealthNums].temperature3) != 0 && strlen(health[NowHealthNums].cough) != 0)
SaveHealth();
else {
HWND SignError = GetHWnd();
int isok = MessageBox(SignError, "请勿输入空语句!", "提示", MB_OK);
}
}
void SaveHealth() {
if (strlen(health[NowHealthNums].temperature1) == 0 || strlen(health[NowHealthNums].temperature2) == 0 ||
strlen(health[NowHealthNums].temperature3) == 0 || strlen(health[NowHealthNums].cough) == 0) {
HWND SignError = GetHWnd();
int isok = MessageBox(SignError, "请勿输入空语句!", "提示", MB_OK);
return;
}
else {
FILE* fp;
fopen_s(&fp, "HealthFile.txt", "a");
if (fp == NULL) {
return;
}
fprintf(fp, "%-10s\t%-15s\t%-5s\t%-5s\t%-5s\t%-5s\n",
health[NowHealthNums].ID,
health[NowHealthNums].date,
health[NowHealthNums].temperature1,
health[NowHealthNums].temperature2,
health[NowHealthNums].temperature3,
health[NowHealthNums].cough);
fclose(fp);
NowHealthNums++;
}
}
int ReturnHealthPosision(int flagNowStu) {
char ReceInput[64];
TCHAR InputWindowFI[] = _T("请输入待修改项对应的日期");
InputBox(ReceInput, 15, InputWindowFI);
for (int w = 0; w < NowHealthNums; w++) {
if (strcmp(health[w].date, ReceInput) == 0 && strcmp(StuArry[flagNowStu].ID, health[w].ID) == 0)
{
return w;
}
}
return -1;
}
void ModifyHealth(int flagNowStu) {
int TempModi = ReturnHealthPosision(flagNowStu);
if (TempModi == -1)
{
HWND hndtipsM = GetHWnd();
int isok = MessageBox(hndtipsM, "没有您的健康信息记录,请先填写健康信息!", "提示", MB_OK);
}
else
{
cleardevice(); MOUSEMSG Modi;
initgraph(860, 760);
IMAGE picture2;
loadimage(&picture2, "images/secondbg.png", 860, 760);
putimage(0, 0, &picture2);
setfillcolor(GREEN);
fillrectangle(690, 590, 850, 640);
fillrectangle(10, 40, 850, 180);
fillrectangle(10, 240, 850, 380);
setbkmode(TRANSPARENT);
settextstyle(50, 0, "宋体");
outtextxy(40, 40, "修改前");
outtextxy(40, 240, "修改后");
settextstyle(30, 0, "宋体");
outtextxy(10, 100, "日期");
outtextxy(200, 100, "体温(早)");
outtextxy(340, 100, "体温(中)");
outtextxy(480, 100, "体温(晚)");
outtextxy(620, 100, "是否咳嗽");
outtextxy(740, 600, "返回");
outtextxy(10, 300, "日期");
outtextxy(200, 300, "体温(早)");
outtextxy(340, 300, "体温(中)");
outtextxy(480, 300, "体温(晚)");
outtextxy(620, 300, "是否咳嗽");
setcolor(RED);
settextstyle(30, 0, "宋体");
char NowStuID[len] = "当前用户ID:";
strcat_s(NowStuID, StuArry[flagNowStu].ID);
outtextxy(450, 720, NowStuID);
setcolor(WHITE);
outtextxy(10, 140, health[TempModi].date);
outtextxy(200, 140, health[TempModi].temperature1);
outtextxy(260, 140, "℃");
outtextxy(340, 140, health[TempModi].temperature2);
outtextxy(400, 140, "℃");
outtextxy(480, 140, health[TempModi].temperature3);
outtextxy(540, 140, "℃");
outtextxy(620, 140, health[TempModi].cough);
while (1) {
char TempModiNums[64];
TCHAR InputWindow0[] = _T("请输入修改后的日期");
InputBox(TempModiNums, 15, InputWindow0);
if (strcmp(TempModiNums, health[TempModi].date) == 0)
{
break;
}
else
{
int nums = strlen(TempModiNums);
int FlagInput4 = 0;
for (int i = 0; i < NowHealthNums; i++) {
if (strcmp(TempModiNums, health[i].date) == 0 && strcmp(health[i].ID, StuArry[flagNowStu].ID) == 0) {
FlagInput4 = 1;
break;
}
}
if (FlagInput4 == 1) {
HWND hwndInput4 = GetHWnd();
int isok = MessageBox(hwndInput4, "您输入的日期已经存在,请重新输入", "提示", MB_OK);
}
else if (FlagInput4 == 0) {
memcpy(health[TempModi].date, TempModiNums, 15);
break;
}
}
}
TCHAR InputWindow1[] = _T("请输入修改后的体温(早)");
InputBox(health[TempModi].temperature1, 10, InputWindow1);
TCHAR InputWindow2[] = _T("请输入修改后的体温(中)");
InputBox(health[TempModi].temperature2, 10, InputWindow2);
TCHAR InputWindow3[] = _T("请输入修改后的体温(晚)");
InputBox(health[TempModi].temperature3, 10, InputWindow3);
TCHAR InputWindow4[] = _T("请输入你当天是否咳嗽");
InputBox(health[TempModi].cough, 10, InputWindow4);
outtextxy(10, 340, health[TempModi].date);
outtextxy(200, 340, health[TempModi].temperature1);
outtextxy(260, 340, "℃");
outtextxy(340, 340, health[TempModi].temperature2);
outtextxy(400, 340, "℃");
outtextxy(480, 340, health[TempModi].temperature3);
outtextxy(540, 340, "℃");
outtextxy(620, 340, health[TempModi].cough);
if (strlen(health[TempModi].date) != 0 && strlen(health[TempModi].temperature1) != 0 && strlen(health[TempModi].temperature2) != 0 &&
strlen(health[TempModi].temperature3) != 0 && strlen(health[TempModi].cough) != 0) {
SaveModifyHealth();
}
else {
HWND SignError = GetHWnd();
int isok = MessageBox(SignError, "请勿输入空语句!", "提示", MB_OK);
}
while (1) {
Modi = GetMouseMsg();
if (Modi.x >= 690 && Modi.x <= 850 && Modi.y >= 590 && Modi.y <= 640) {
setlinecolor(RED);
rectangle(690, 590, 850, 640);
if (Modi.uMsg == WM_LBUTTONDOWN) {
cleardevice();
HealthRecord(flagNowStu);
}
}
else {
setlinecolor(WHITE);
rectangle(690, 590, 850, 640);
}
}
}
}
void SaveModifyHealth() {
FILE* fp;
fopen_s(&fp, "HealthFile.txt", "w");
if (fp == NULL) {
return;
}
for (int i = 0; i < NowHealthNums; i++) {
fprintf(fp, "%-10s\t%-15s\t%-5s\t%-5s\t%-5s\t%-5s\n",
health[i].ID,
health[i].date,
health[i].temperature1,
health[i].temperature2,
health[i].temperature3,
health[i].cough);
}
fclose(fp);
}
void ReadHealth() {
FILE* fp;
fopen_s(&fp, "HealthFile.txt", "r");
if (fp == NULL) {
return;
}
for (int i = 0; i < n; i++) {
fscanf_s(fp, "%s\t%s\t%s\t%s\t%s\t%s\n",
health[i].ID, 10,
health[i].date, len,
health[i].temperature1, 5,
health[i].temperature2, 5,
health[i].temperature3, 5,
health[i].cough, 5);
}
int FileHealthNums = 0;
for (int k = 0; k < n; k++) {
if (strlen(health[k].ID) != 0) {
NowHealthNums = ++FileHealthNums;
}
}
fclose(fp);
}
void TestRecord(int flagNowStu) {
initgraph(760, 760);
cleardevice();
MOUSEMSG m2;
cleardevice();
IMAGE picture1;
loadimage(&picture1, "images/secondbg.png", 760, 760);
putimage(0, 0, &picture1);
setfillcolor(GREEN);
setbkmode(TRANSPARENT);
char SecondTitle1[5] = { "学" };
char SecondTitle2[5] = { "生" };
char SecondTitle3[5] = { "用" };
char SecondTitle4[5] = { "户" };
char SecondTitle5[5] = { "操" };
char SecondTitle6[5] = { "作" };
char SecondTitle7[5] = { "界" };
char SecondTitle8[5] = { "面" };
fillrectangle(50, 145, 100, 625);
settextstyle(50, 0, "宋体");
outtextxy(50, 150, SecondTitle1);
outtextxy(50, 210, SecondTitle2);
outtextxy(50, 270, SecondTitle3);
outtextxy(50, 330, SecondTitle4);
outtextxy(50, 390, SecondTitle5);
outtextxy(50, 450, SecondTitle6);
outtextxy(50, 510, SecondTitle7);
outtextxy(50, 570, SecondTitle8);
setbkmode(TRANSPARENT);
fillrectangle(230, 160, 560, 200);
fillrectangle(230, 360, 560, 400);
fillrectangle(230, 560, 560, 600);
setbkmode(TRANSPARENT);
setcolor(RED);
settextstyle(30, 0, "宋体");
char NowStuID[len] = "当前用户ID:";
strcat_s(NowStuID, StuArry[flagNowStu].ID);
outtextxy(450, 720, NowStuID);
setcolor(WHITE);
LOGFONT f;
gettextstyle(&f);
_tcscpy_s(f.lfFaceName, _T("宋体"));
f.lfQuality = ANTIALIASED_QUALITY;
f.lfHeight = 40;
settextstyle(&f);
char FirstSelect1[20] = { "添加核酸检测情况" };
char FirstSelect2[20] = { "修改核酸检测情况" };
char FirstSelect3[20] = { "返回" };
RECT R[3] = { {230, 160, 560, 200},{230, 360, 560, 400},{230, 560, 560, 600} };
drawtext(FirstSelect1, &R[0], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect2, &R[1], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect3, &R[2], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
while (1) {
m2 = GetMouseMsg();
if (m2.x >= 230 && m2.x <= 560 && m2.y >= 160 && m2.y <= 200) {
setlinecolor(RED);
rectangle(230, 160, 560, 200);
if (m2.uMsg == WM_LBUTTONDOWN) {
InputTest(flagNowStu);
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 360 && m2.y <= 400) {
setlinecolor(RED);
rectangle(230, 360, 560, 400);
if (m2.uMsg == WM_LBUTTONDOWN) {
ModifyTest(flagNowStu);
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 560 && m2.y <= 600) {
setlinecolor(RED);
rectangle(230, 560, 560, 600);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
StudentPage(flagNowStu);
}
}
else {
setlinecolor(WHITE);
rectangle(230, 160, 560, 200);
rectangle(230, 360, 560, 400);
rectangle(230, 560, 560, 600);
}
}
}
void InputTest(int flagNowStu) {
char date[15];
TCHAR InputWindow0[] = _T("请输入核酸检测的日期");
InputBox(date, 15, InputWindow0);
for (int i = 0; i < NowTestNums; i++) {
if (strcmp(StuArry[flagNowStu].ID, test[i].ID) == 0 && strcmp(date, test[i].date) == 0) {
HWND hwndInput1 = GetHWnd();
int isok = MessageBox(hwndInput1, "你已经输入过这条核酸检测信息,请使用修改功能", "提示", MB_OK);
HealthRecord(flagNowStu);
}
}
strcpy_s(test[NowTestNums].ID, StuArry[flagNowStu].ID);
strcpy_s(test[NowTestNums].date, date);
TCHAR InputWindow1[] = _T("请输入你本次的核酸检测结果");
InputBox(test[NowTestNums].result, 10, InputWindow1);
SaveTest();
}
void SaveTest() {
if (strlen(test[NowTestNums].result) == 0) {
HWND SignError = GetHWnd();
int isok = MessageBox(SignError, "请勿输入空语句!", "提示", MB_OK);
return;
}
else {
FILE* fp;
fopen_s(&fp, "TestFile.txt", "a");
if (fp == NULL) {
return;
}
fprintf(fp, "%s\t%s\t%s\n",
test[NowTestNums].ID,
test[NowTestNums].date,
test[NowTestNums].result);
fclose(fp);
NowTestNums++;
}
}
int ReturnTestPosision(int flagNowStu) {
char ReceInput[64];
TCHAR InputWindowFI[] = _T("请输入待修改项对应的日期");
InputBox(ReceInput, 15, InputWindowFI);
for (int w = 0; w < NowTestNums; w++) {
if (strcmp(test[w].date, ReceInput) == 0 && strcmp(StuArry[flagNowStu].ID, test[w].ID) == 0)
{
return w;
}
}
return -1;
}
void ModifyTest(int flagNowStu) {
int TempModi = ReturnTestPosision(flagNowStu);
if (TempModi == -1)
{
HWND hndtipsM = GetHWnd();
int isok = MessageBox(hndtipsM, "没有您的核酸检测信息记录,请先填写健康信息!", "提示", MB_OK);
}
else
{
cleardevice(); MOUSEMSG Modi;
initgraph(860, 760);
IMAGE picture2;
loadimage(&picture2, "images/secondbg.png", 860, 760);
putimage(0, 0, &picture2);
setfillcolor(GREEN);
fillrectangle(690, 590, 850, 640);
fillrectangle(10, 40, 850, 180);
fillrectangle(10, 240, 850, 380);
setbkmode(TRANSPARENT);
settextstyle(50, 0, "宋体");
outtextxy(40, 40, "修改前");
outtextxy(40, 240, "修改后");
settextstyle(30, 0, "宋体");
outtextxy(10, 100, "学号");
outtextxy(200, 100, "日期");
outtextxy(390, 100, "结果");
outtextxy(740, 600, "返回");
outtextxy(10, 300, "学号");
outtextxy(200, 300, "日期");
outtextxy(390, 300, "结果");
setcolor(RED);
settextstyle(30, 0, "宋体");
char NowStuID[len] = "当前用户ID:";
strcat_s(NowStuID, StuArry[flagNowStu].ID);
outtextxy(450, 720, NowStuID);
setcolor(WHITE);
outtextxy(10, 140, test[TempModi].ID);
outtextxy(200, 140, test[TempModi].date);
outtextxy(390, 140, test[TempModi].result);
while (1) {
char TempModiNums[64];
TCHAR InputWindow0[] = _T("请输入修改后的日期");
InputBox(TempModiNums, 15, InputWindow0);
if (strcmp(TempModiNums, test[TempModi].date) == 0)
{
break;
}
else
{
int nums = strlen(TempModiNums);
int FlagInput4 = 0;
for (int i = 0; i < NowTestNums; i++) {
if (strcmp(TempModiNums, test[i].date) == 0 && strcmp(test[i].ID, StuArry[flagNowStu].ID) == 0) {
FlagInput4 = 1;
break;
}
}
if (FlagInput4 == 1) {
HWND hwndInput4 = GetHWnd();
int isok = MessageBox(hwndInput4, "您输入的日期已经存在,请重新输入", "提示", MB_OK);
}
else if (FlagInput4 == 0) {
memcpy(test[TempModi].date, TempModiNums, 15);
break;
}
}
}
TCHAR InputWindow1[] = _T("请输入修改后检测结果");
InputBox(test[TempModi].result, 10, InputWindow1);
outtextxy(10, 340, test[TempModi].ID);
outtextxy(200, 340, test[TempModi].date);
outtextxy(390, 340, test[TempModi].result);
SaveModifyTest();
while (1) {
Modi = GetMouseMsg();
if (Modi.x >= 690 && Modi.x <= 850 && Modi.y >= 590 && Modi.y <= 640) {
setlinecolor(RED);
rectangle(690, 590, 850, 640);
if (Modi.uMsg == WM_LBUTTONDOWN) {
cleardevice();
TestRecord(flagNowStu);
}
}
else {
setlinecolor(WHITE);
rectangle(690, 590, 850, 640);
}
}
}
}
void SaveModifyTest() {
FILE* fp;
fopen_s(&fp, "TestFile.txt", "w");
if (fp == NULL) {
return;
}
for (int i = 0; i < NowTestNums; i++) {
fprintf(fp, "%s\t%s\t%s\n",
test[i].ID,
test[i].date,
test[i].result);
}
fclose(fp);
}
void ReadTest() {
FILE* fp;
fopen_s(&fp, "TestFile.txt", "r");
if (fp == NULL) {
return;
}
for (int i = 0; i < n; i++) {
fscanf_s(fp, "%s\t%s\t%s\n",
test[i].ID, 10,
test[i].date, len,
test[i].result, 10);
}
int FileTestNums = 0;
for (int k = 0; k < n; k++) {
if (strlen(test[k].ID) != 0) {
NowTestNums = ++FileTestNums;
}
}
fclose(fp);
}
void VaccineRecord(int flagNowStu) {
initgraph(760, 760);
cleardevice();
MOUSEMSG m2;
cleardevice();
IMAGE picture1;
loadimage(&picture1, "images/secondbg.png", 760, 760);
putimage(0, 0, &picture1);
setfillcolor(GREEN);
setbkmode(TRANSPARENT);
char SecondTitle1[5] = { "学" };
char SecondTitle2[5] = { "生" };
char SecondTitle3[5] = { "用" };
char SecondTitle4[5] = { "户" };
char SecondTitle5[5] = { "操" };
char SecondTitle6[5] = { "作" };
char SecondTitle7[5] = { "界" };
char SecondTitle8[5] = { "面" };
fillrectangle(50, 145, 100, 625);
settextstyle(50, 0, "宋体");
outtextxy(50, 150, SecondTitle1);
outtextxy(50, 210, SecondTitle2);
outtextxy(50, 270, SecondTitle3);
outtextxy(50, 330, SecondTitle4);
outtextxy(50, 390, SecondTitle5);
outtextxy(50, 450, SecondTitle6);
outtextxy(50, 510, SecondTitle7);
outtextxy(50, 570, SecondTitle8);
setbkmode(TRANSPARENT);
fillrectangle(230, 160, 560, 200);
fillrectangle(230, 360, 560, 400);
fillrectangle(230, 560, 560, 600);
setbkmode(TRANSPARENT);
setcolor(RED);
settextstyle(30, 0, "宋体");
char NowStuID[len] = "当前用户ID:";
strcat_s(NowStuID, StuArry[flagNowStu].ID);
outtextxy(450, 720, NowStuID);
setcolor(WHITE);
LOGFONT f;
gettextstyle(&f);
_tcscpy_s(f.lfFaceName, _T("宋体"));
f.lfQuality = ANTIALIASED_QUALITY;
f.lfHeight = 40;
settextstyle(&f);
char FirstSelect1[20] = { "添加疫苗接种情况" };
char FirstSelect2[20] = { "修改疫苗接种情况" };
char FirstSelect3[20] = { "返回" };
RECT R[3] = { {230, 160, 560, 200},{230, 360, 560, 400},{230, 560, 560, 600} };
drawtext(FirstSelect1, &R[0], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect2, &R[1], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
drawtext(FirstSelect3, &R[2], DT_CENTER | DT_VCENTER | DT_SINGLELINE);
while (1) {
m2 = GetMouseMsg();
if (m2.x >= 230 && m2.x <= 560 && m2.y >= 160 && m2.y <= 200) {
setlinecolor(RED);
rectangle(230, 160, 560, 200);
if (m2.uMsg == WM_LBUTTONDOWN) {
InputVaccine(flagNowStu);
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 360 && m2.y <= 400) {
setlinecolor(RED);
rectangle(230, 360, 560, 400);
if (m2.uMsg == WM_LBUTTONDOWN) {
ModifyVaccine(flagNowStu);
}
}
else if (m2.x >= 230 && m2.x <= 560 && m2.y >= 560 && m2.y <= 600) {
setlinecolor(RED);
rectangle(230, 560, 560, 600);
if (m2.uMsg == WM_LBUTTONDOWN) {
cleardevice();
StudentPage(flagNowStu);
}
}
else {
setlinecolor(WHITE);
rectangle(230, 160, 560, 200);
rectangle(230, 360, 560, 400);
rectangle(230, 560, 560, 600);
}
}
}
void InputVaccine(int flagNowStu) {
char date[15];
TCHAR InputWindow0[] = _T("请输入接种疫苗的日期");
InputBox(date, 15, InputWindow0);
for (int i = 0; i < NowVaccineNums; i++) {
if (strcmp(StuArry[flagNowStu].ID, vaccine[i].ID) == 0 && strcmp(date, vaccine[i].date) == 0) {
HWND hwndInput1 = GetHWnd();
int isok = MessageBox(hwndInput1, "你已经输入过这条核酸检测信息,请使用修改功能", "提示", MB_OK);
HealthRecord(flagNowStu);
}
}
strcpy_s(vaccine[NowVaccineNums].ID, StuArry[flagNowStu].ID);
strcpy_s(vaccine[NowVaccineNums].date, date);
TCHAR InputWindow1[] = _T("请输入你本次的疫苗接种型号");
InputBox(vaccine[NowVaccineNums].type, 10, InputWindow1);
SaveVaccine();
}
void SaveVaccine() {
if (strlen(vaccine[NowVaccineNums].type) == 0) {
HWND SignError = GetHWnd();
int isok = MessageBox(SignError, "请勿输入空语句!", "提示", MB_OK);
return;
}
else {
FILE* fp;
fopen_s(&fp, "VaccineFile.txt", "a");
if (fp == NULL) {
return;
}
fprintf(fp, "%s\t%s\t%s\n",
vaccine[NowVaccineNums].ID,
vaccine[NowVaccineNums].date,
vaccine[NowVaccineNums].type);
fclose(fp);
NowVaccineNums++;
}
}
int ReturnVaccinePosision(int flagNowStu) {
char ReceInput[64];
TCHAR InputWindowFI[] = _T("请输入待修改项对应的日期");
InputBox(ReceInput, 15, InputWindowFI);
for (int w = 0; w < NowVaccineNums; w++) {
if (strcmp(vaccine[w].date, ReceInput) == 0 && strcmp(StuArry[flagNowStu].ID, vaccine[w].ID) == 0)
{
return w;
}
}
return -1;
}
void ModifyVaccine(int flagNowStu) {
int TempModi = ReturnVaccinePosision(flagNowStu);
if (TempModi == -1)
{
HWND hndtipsM = GetHWnd();
int isok = MessageBox(hndtipsM, "没有您的核酸检测信息记录,请先填写健康信息!", "提示", MB_OK);
}
else
{
cleardevice(); MOUSEMSG Modi;
initgraph(860, 760);
IMAGE picture2;
loadimage(&picture2, "images/secondbg.png", 860, 760);
putimage(0, 0, &picture2);
setfillcolor(GREEN);
fillrectangle(690, 590, 850, 640);
fillrectangle(10, 40, 850, 180);
fillrectangle(10, 240, 850, 380);
setbkmode(TRANSPARENT);
settextstyle(50, 0, "宋体");
outtextxy(40, 40, "修改前");
outtextxy(40, 240, "修改后");
settextstyle(30, 0, "宋体");
outtextxy(10, 100, "学号");
outtextxy(200, 100, "日期");
outtextxy(390, 100, "结果");
outtextxy(740, 600, "返回");
outtextxy(10, 300, "学号");
outtextxy(200, 300, "日期");
outtextxy(390, 300, "结果");
setcolor(RED);
settextstyle(30, 0, "宋体");
char NowStuID[len] = "当前用户ID:";
strcat_s(NowStuID, StuArry[flagNowStu].ID);
outtextxy(450, 720, NowStuID);
setcolor(WHITE);
outtextxy(10, 140, vaccine[TempModi].ID);
outtextxy(200, 140, vaccine[TempModi].date);
outtextxy(390, 140, vaccine[TempModi].type);
while (1) {
char TempModiNums[64];
TCHAR InputWindow0[] = _T("请输入修改后的日期");
InputBox(TempModiNums, 15, InputWindow0);
if (strcmp(TempModiNums, vaccine[TempModi].date) == 0)
{
break;
}
else
{
int nums = strlen(TempModiNums);
int FlagInput4 = 0;
for (int i = 0; i < NowVaccineNums; i++) {
if (strcmp(TempModiNums, vaccine[i].date) == 0 && strcmp(vaccine[i].ID, StuArry[flagNowStu].ID) == 0) {
FlagInput4 = 1;
break;
}
}
if (FlagInput4 == 1) {
HWND hwndInput4 = GetHWnd();
int isok = MessageBox(hwndInput4, "您输入的日期已经存在,请重新输入", "提示", MB_OK);
}
else if (FlagInput4 == 0) {
memcpy(vaccine[TempModi].date, TempModiNums, 15);
break;
}
}
}
TCHAR InputWindow1[] = _T("请输入修改后的接种型号");
InputBox(vaccine[TempModi].type, 10, InputWindow1);
outtextxy(10, 340, vaccine[TempModi].ID);
outtextxy(200, 340, vaccine[TempModi].date);
outtextxy(390, 340, vaccine[TempModi].type);
SaveModifyVaccine();
while (1) {
Modi = GetMouseMsg();
if (Modi.x >= 690 && Modi.x <= 850 && Modi.y >= 590 && Modi.y <= 640) {
setlinecolor(RED);
rectangle(690, 590, 850, 640);
if (Modi.uMsg == WM_LBUTTONDOWN) {
cleardevice();
VaccineRecord(flagNowStu);
}
}
else {
setlinecolor(WHITE);
rectangle(690, 590, 850, 640);
}
}
}
}
void SaveModifyVaccine() {
FILE* fp;
fopen_s(&fp, "VaccineFile.txt", "w");
if (fp == NULL) {
return;
}
for (int i = 0; i < NowVaccineNums; i++) {
fprintf(fp, "%s\t%s\t%s\n",
vaccine[i].ID,
vaccine[i].date,
vaccine[i].type);
}
fclose(fp);
}
void ReadVaccine() {
FILE* fp;
fopen_s(&fp, "VaccineFile.txt", "r");
if (fp == NULL) {
return;
}
for (int i = 0; i < n; i++) {
fscanf_s(fp, "%s\t%s\t%s\n",
vaccine[i].ID, 10,
vaccine[i].date, len,
vaccine[i].type, 10);
}
int FileVaccineNums = 0;
for (int k = 0; k < n; k++) {
if (strlen(test[k].ID) != 0) {
NowVaccineNums = ++FileVaccineNums;
}
}
fclose(fp);
}
int main() {
FirstPage();
system("pause");
return 0;
}
yiqing.h
#pragma once
#include<stdio.h>
#include<stdlib.h>
#include<graphics.h>
#include<string.h>
#include<ctype.h>
#define n 1000
#define len 80
typedef struct Admin {
char name[len];
char password[len];
}ADM;
typedef struct Student {
char name[len];
char ID[10];
char password[len];
char phone[15];
char email[len];
char faculty[len];
int TestTimes;
}STU;
typedef struct Health {
char ID[10];
char date[len];
char temperature1[5], temperature2[5], temperature3[5];
char cough[5];
}Health;
typedef struct Test {
char ID[10];
char date[len];
char result[10];
}Test;
typedef struct Vaccine {
char ID[10];
char date[len];
char type[10];
}Vaccine;
void FirstPage();
void AdminPage();
void AdminSignIn();
void ReadInfor();
void StuInfo();
int ReturnPosi();
void InputInfor();
void SaveInfor();
void FindInfo();
void PrintFindInfor(int);
void DeSomeStu();
void DeleteStuInfor();
void ModifyStudInfor();
void SaveInforModi();
void StuRecord();
void ShowHealthRecord();
void ShowTestRecord();
void ShowVaccineRecord();
void StuProblem();
void ShowFeverStudent();
void ShowCoughStudent();
void StuAnalyse();
void SortTemperature();
void getTestTimes();
void SortTest();
void CheckTestTimes();
void StuSignIn();
void StudentPage(int);
void ModifyStudInfor2(int);
void HealthRecord(int);
void ReadHealth();
void InputHealth(int);
void SaveHealth();
void ModifyHealth(int);
int ReturnHealthPosision(int);
void SaveModifyHealth();
void TestRecord(int);
void ReadTest();
void InputTest(int);
void SaveTest();
void ModifyTest(int);
int ReturnTestPosision(int);
void SaveModifyTest();
void VaccineRecord(int);
void ReadVaccine();
void InputVaccine(int);
void SaveVaccine();
void ModifyVaccine(int);
int ReturnVaccinePosision(int);
void SaveModifyVaccine();
|