-
Notifications
You must be signed in to change notification settings - Fork 0
/
CL_map_TBSTOCK.cpp
77 lines (63 loc) · 1.59 KB
/
CL_map_TBSTOCK.cpp
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
#include "CL_map_TBSTOCK.h"
using namespace NS_Composants;
CL_map_TBSTOCK::CL_map_TBSTOCK()
{
this->reference_article = -1;
this->nom_article = "RIEN";
this->qte_article = "RIEN";
}
String^ CL_map_TBSTOCK::SELECT()
{
return "SELECT reference_article, nom_article, qte_article " +
"FROM TB_STOCK;";
}
String^ CL_map_TBSTOCK::INSERT()
{
return "INSERT INTO TB_STOCK " +
"(nom_article, qte_article) " +
"VALUES('" + this->getNomArtcl() + "', '" + this->getQte() + "');SELECT @@IDENTITY;";
}
String^ CL_map_TBSTOCK::UPDATE()
{
return "UPDATE TB_STOCK " +
"SET nom_article = '" + this->getNomArtcl() + "', qte_article = '" + this->getQte() + "' " +
"WHERE(reference_article = " + this->getRef() + ");";
}
String^ CL_map_TBSTOCK::DELETE()
{
return "DELETE FROM TB_STOCK " +
"WHERE(reference_article = " + this->getRef() + ");";
}
void CL_map_TBSTOCK::setRef(int reference_article)
{
if (reference_article > 0)
{
this->reference_article = reference_article;
}
}
void CL_map_TBSTOCK::setNomArtcl(String^ nom_article)
{
if (nom_article != "")
{
this->nom_article = nom_article;
}
}
void CL_map_TBSTOCK::setQte(String^ qte_article)
{
if (qte_article != "")
{
this->qte_article = qte_article;
}
}
int CL_map_TBSTOCK::getRef()
{
return this->reference_article;
}
String^ CL_map_TBSTOCK::getNomArtcl()
{
return this->nom_article;
}
String^ CL_map_TBSTOCK::getQte()
{
this->qte_article = qte_article;
}