-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutils_db.h
57 lines (32 loc) · 1.77 KB
/
utils_db.h
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
#ifndef UTILS_DB_H
#define UTILS_DB_H
#include "globe.h"
class utils_db
{
public:
utils_db();
public:
QSqlDatabase getDatabase();
bool queryUser(QString username, QString password, string type);
bool queryUser(QString username);
bool insertUser(QString username, QString password);
bool deleteUser(QString username);
bool updateUser(QString username, QString password);
bool uppdateAdmin_ReservationTableState(QString classroomId, QString teacherId, QString reserveTime, QString type);
bool delAdminCheckedReservation(QString classroomId, QString teacherId);
bool updateClassroomState(QString classroomId, QString reserveTime, QString type);
bool delClassroom(QString classroomId, QString reserveTime);
bool setAllClassroomsEmpty();
bool setAllClassroomsReserve();
QVariantList queryAllClassrooms();
bool teacherUpdatehisReserveTime(QString classroomId, QString reserveTime, QString upDateTime, QString state);
bool teacherUpdatehisReserveClassroom(QString classroomId, QString reserveTime, QString upClassroomId, QString state);
bool teacherDelSingleReservatiom(QString id, QString classroomId, QString reserveTime);
bool teacherUpdatehisReserveCheck(QString classroomId, QString reserveTime, QString state);
bool classroomStateUpdate(QString classroomId, QString reserveTime, QString state);
bool addReservation(QString classroomId, QString teacherId, QString teacherName, QString submitTime, QString reserveTime);
QString searchNameById(QString teacherId);
QStringList queryALLClassroomIdByTimeandState(QString time, QString state);
QStringList queryAbleReserveTimeByClassroomId(QString id, QString state);
};
#endif // UTILS_DB_H