/[H6]/PostgresLayer.h
ViewVC logotype

Contents of /PostgresLayer.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 47 - (show annotations) (download)
Wed Sep 6 20:27:24 2006 UTC (17 years, 6 months ago) by torben
File MIME type: text/plain
File size: 1251 byte(s)
Added support for config file
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 };

  ViewVC Help
Powered by ViewVC 1.1.20