-
Notifications
You must be signed in to change notification settings - Fork 0
/
S_Item.cpp
40 lines (35 loc) · 1.03 KB
/
S_Item.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
#include "S_Item.h"
//#include "C_Item.h"
#include "AccederAuxDonnées.h"
using namespace Services;
using namespace Composants;
S_Item::S_Item() {
this->Aad = gcnew AccederAuxDonnées();
this->Litem = gcnew C_Item();
}
void S_Item::ajouter(String^ Nom, String^ Typeof, String^ Color,int Stock,double Prix_uht,int Seuil,double Prix_achat) {
String^ sql;
//this->C_Item::setIdItem( nom);
this->Litem->setIdColor( Color);
this->Litem->setNom(Nom);
this->Litem->setTypeOf(Typeof);
this->Litem->setPrixAchat(Prix_achat);
this->Litem->setPrixVente(Prix_uht);
this->Litem->setStock(Stock);
this->Litem->setSeuil(Seuil);
sql = this->Litem->insert();
this->Aad->actionRows(sql);
}
DataSet^ S_Item::afficher(String^ Table) {
String^ sql;
sql = this->Litem->select();
return this->Aad->getRows(sql,Table);
}
void S_Item::modifier(int Param, String^ Modif, String^ Valeur) {
String^ sql;
this->Litem->setParam(Param);
this->Litem->setModif(Modif);
this->Litem->setValeur(Valeur);
sql = this->Litem->update();
this->Aad->actionRows(sql);
}