1 |
/*
|
2 |
* Primary developers: Hedin & Kevin
|
3 |
*/
|
4 |
|
5 |
#pragma once
|
6 |
|
7 |
#include "DatabaseLayer.h"
|
8 |
#include "Containers.h"
|
9 |
#include "ConfigFile.h"
|
10 |
#include <vector>
|
11 |
|
12 |
using namespace std;
|
13 |
|
14 |
class PostgresLayer : public DatabaseLayer
|
15 |
{
|
16 |
private:
|
17 |
CDatabase db;
|
18 |
|
19 |
public:
|
20 |
PostgresLayer(ConfigFile &config);
|
21 |
~PostgresLayer(void);
|
22 |
|
23 |
vector<Person> GetPersonAll(void);
|
24 |
Person GetPerson(CString wantInits);
|
25 |
|
26 |
bool AddPerson(Person NewPerson);
|
27 |
bool UpdatePerson(Person ChangePerson);
|
28 |
bool DeletePerson(Person RemovePerson);
|
29 |
bool ReturnEquipment(CString barcode);
|
30 |
bool CheckoutEquipment(Person CheckPersID, Equipment CheckEquip, int Numdays);
|
31 |
bool EquipmentReservation(CString barcode, Person CheckPerson);
|
32 |
bool UpdateEquipment(Equipment CheckEquip);
|
33 |
bool AddEquipment(Equipment AddEquip);
|
34 |
vector<Equipment> GetEquipmentAll(void);
|
35 |
Equipment GetEquipment(CString wantBarcode);
|
36 |
bool DeleteEquipment(Equipment DelEquip);
|
37 |
vector<Equipment> Search(CString barcode, CString name, CString inits, bool available, bool reserved, bool deposited);
|
38 |
void checkReservations(CString barcode);
|
39 |
bool DeleteReservation(CString barcode, CString resid);
|
40 |
|
41 |
private:
|
42 |
void FillEquipmentVector(vector<Equipment> &buffer, CRecordset &rs);
|
43 |
};
|