This repository has been archived by the owner on Apr 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
cgestionbdd.h
56 lines (45 loc) · 1.6 KB
/
cgestionbdd.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
#ifndef CGESTIONBDD_H
#define CGESTIONBDD_H
#include <QString>
#include <QList>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QMessageBox>
#include <QVariant>
#include <QCryptographicHash>
#include <QSqlError>
#include <QDate>
#include "product.h"
#include "client.h"
#include "product.h"
#include "settings.h"
class CGestionBDD
{
public:
static bool connectionBDD();
static void deconnectionBDD();
static void getProductList( QList<CProduct*>& listProduct );
static void addProduct( CProduct& product );
static void removeProduct( CProduct& product );
static void updateProduct( CProduct& product );
static CProduct getProduct( int i );
static void getClientList( QList<CClient*>& listClient );
static void getClientList( QList<CClient*>& listClient, QString critere );
static void addClient( CClient& client );
static void removeClient( CClient& client );
static void updateClient( CClient& client );
static CClient getClient( int i );
static void updatePromo( QString from, QString to );
static bool identification( QString username, QString password );
static bool identification( QString password );
static void changerMDP( QString newPassword );
static int addDate( QString date, QString time );
static void addApprovisionnement( int idCli, int idDate, double value );
static void addDette( int idCli, int idPro, int idDate, double somme );
static QList<int> getHistorique( int idPro, int nbSemaine );
private:
static QString sGESnomBDD;
static QString sGEShostName;
static QSqlDatabase db;
};
#endif // CGESTIONBDD_H