-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTeacher.cpp
More file actions
57 lines (53 loc) · 1.63 KB
/
Copy pathTeacher.cpp
File metadata and controls
57 lines (53 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include"Teacher.h"
#include"mysqlCon.h"
Teacher::Teacher()
{
}
Teacher::Teacher(string tid, string username, string password)
{
this->tid = tid;
this->username = username;
this->password = password;
}
void Teacher::openMenu()
{
system("cls");
cout << "\t\t\t\t" << " 欢迎" + this->username + "教师登录" << endl;
cout << "\t\t\t\t" << "===============================" << endl;
cout << "\t\t\t\t" << "| |" << endl;
cout << "\t\t\t\t" << "| |" << endl;
cout << "\t\t\t\t" << "| 1. 查看所有预约 |" << endl;
cout << "\t\t\t\t" << "| |" << endl;
cout << "\t\t\t\t" << "| 2. 审核预约 |" << endl;
cout << "\t\t\t\t" << "| |" << endl;
cout << "\t\t\t\t" << "| 0. 注销登录 |" << endl;
cout << "\t\t\t\t" << "| |" << endl;
cout << "\t\t\t\t" << "| |" << endl;
cout << "\t\t\t\t" << "===============================" << endl;
}
bool Teacher::showAllorder()
{
return mysqlCon::allOrder();
}
void Teacher::verifyOrder()
{
if (showAllorder()) {
string room;
cout << "\t\t请输入要审核的机房号:";
cin >> room;
string time;
cout << "\t\t请输入要审核的时间:";
cin >> time;
if (mysqlCon::verify(room, time)) {
int c;
cout << "\t\t是否同意该申请?输入1同意申请,输入2拒绝申请:";
cin >> c;
mysqlCon::verifyOrder(room, time, c);
}
else {
cout << "\t\t您输入的预约记录有误,请重新输入!" << endl;
system("pause");
return;
}
}
}