-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommande.hpp
More file actions
91 lines (78 loc) · 2.15 KB
/
Commande.hpp
File metadata and controls
91 lines (78 loc) · 2.15 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#ifndef COMMANDE_H_INCLUDED
#define COMMANDE_H_INCLUDED
#include <wx/wx.h>
#include <wx/event.h>
#include <vector>
#include <iostream>
#include <map>
#include <utility>
#include <pqxx/pqxx>
#include "Article.hpp"
#include "Produit.hpp"
#include "SnackAddSup.hpp"
#include "Membre.hpp"
using namespace std;
using namespace pqxx;
class Produit;
class Article;
class Membre;
class Commande : public wxBoxSizer
{
public:
void AugmentArticle(Produit*);
Commande(wxPanel*, Membre*);
void SupprimerProduit(Produit* produit);
void DestroyProduit(Produit* produit);
map<Article*, Produit*> commandes;
void NewCommande(Article*);
void MoodUtilisateur();
void MoodAdmin();
private:
Membre* membre;
wxPanel* panel_parent;
wxScrolledWindow* scrole_commandes;
wxStaticBoxSizer* static_sizer_commandes;
wxButton* btn_anulation_commande;
wxButton* btn_validation_commande;
wxButton* btn_sup_presedante_commande;
wxButton* vendre_prix_coutent;
wxButton* vendre_a_perte;
wxBoxSizer* sizer_commandes;
wxBoxSizer* sizer_scrole;
wxBoxSizer* sizer_valid_info;
wxBoxSizer* sizer_prix;
wxBoxSizer* sizer_monnaie;
wxBoxSizer* sizer_rendre;
wxBoxSizer* sizer_anuler_valider;
wxStaticText* affiche_prix;
wxSpinCtrlDouble* monnaie;
wxStaticText* affiche_monnaie_rendu;
double CalculTotal();
void ReffrechTotal();
double CalculMonnaie();
void ReffrechMonnaieARendre();
void EventMonnaie(wxCommandEvent& event);
void ClearCommande();
void Anulation();
void Validation();
void AjouterVente();
void ReffrechCommande();
void AjouterVenteCoutent();
void AjouterVentePerte();
void AnulationCommande();
void EventAnulationCommande(wxCommandEvent& event);
void EventValidationCommande(wxCommandEvent& event);
void EventSuprimeCommande(wxCommandEvent& event);
void CommandeCoutent(wxCommandEvent& event);
void CommandePerte(wxCommandEvent& event);
};
class CommandeSup : public wxDialog
{
public:
CommandeSup(wxPanel*, string);
private:
wxString description;
wxStaticText* text_description;
wxBoxSizer* sizer_commande;
};
#endif