-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdatabase.h
42 lines (35 loc) · 966 Bytes
/
database.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
#ifndef DATABASE_H
#define DATABASE_H
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QString>
#include <string>
#include <QDateTime>
#include <QVariant>
#include "package.h"
#include "guest.h"
#include "room.h"
class Database
{
private:
QSqlDatabase db;
Package inactivepackages[10];
Package activepackages[10];
public:
bool connectDB();
QSqlDatabase getDB();
void addPackages(QString name, QString company, QString details, int price, bool available);
bool removePackages(int id);
void makeAvailable(int id);
void makeUnavailable(int id);
Package getPackageByID(int id);
void getRooms(Guest guests[]);
void getUsers(Room rooms[]);
Guest getGuestDetailByRoomNo(int no);
Guest getGuestDetailByID(int no);
bool guestCheckOut(int id, int id2);
bool payAmount(int amount, int id);
bool isCheckOutAble(int id);
bool loginUser(QString email,QString password);
};
#endif // DATABASE_H