-
Notifications
You must be signed in to change notification settings - Fork 0
/
CLserviceClient.cpp
68 lines (59 loc) · 3.2 KB
/
CLserviceClient.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
#include "CLserviceClient.h"
NS_Comp_Svc::CLservicesClient::CLservicesClient(void)
{
this->oCad = gcnew NS_Comp_Data::CLcad();
this->oMappClient = gcnew NS_Comp_Mappage::CLmapClient();
}
System::Data::DataSet^ NS_Comp_Svc::CLservicesClient::SelectionnerClient(System::String^ dataTableName)
{
System::String^ sql;
sql = this->oMappClient->SelectClient();
return this->oCad->getRows(sql, dataTableName);
}
void NS_Comp_Svc::CLservicesClient::AjouterClient(System::String^ nom, System::String^ prenom, System::String^ datenaissance, System::String^ datepremierachat, System::String^ adresselivraison, System::String^ adressefacturation, System::String^ nomsociete, System::String^ adressesociete, int numserviceclient, int numadresselivraison, int numadressefacturation, int codepostallivraison, int codepostalfacturation, int IDpersonnel)
{
System::String^ sql;
this->oMappClient->setNom(nom);
this->oMappClient->setPrenom(prenom);
this->oMappClient->setDateNaissance(datenaissance);
this->oMappClient->setDatePremierAchat(datepremierachat);
this->oMappClient->setAdresseLivraison(adresselivraison);
this->oMappClient->setAdresseFacturation(adressefacturation);
this->oMappClient->setNomSociete(nomsociete);
this->oMappClient->setAdresseSociete(adressesociete);
this->oMappClient->setNumServiceClient(numserviceclient);
this->oMappClient->setNumAdresseLivraison(numadresselivraison);
this->oMappClient->setNumAdresseFacturation(numadressefacturation);
this->oMappClient->setCodePostalLivraison(codepostallivraison);
this->oMappClient->setCodePostalFacturation(codepostalfacturation);
this->oMappClient->setIDpersonnel(IDpersonnel);
sql = this->oMappClient->InsertClient();
this->oCad->actionRows(sql);
}
void NS_Comp_Svc::CLservicesClient::ModifierClient(System::String^ nom, System::String^ prenom, System::String^ datenaissance, System::String^ datepremierachat, System::String^ adresselivraison, System::String^ adressefacturation, System::String^ nomsociete, System::String^ adressesociete, int numserviceclient, int numadresselivraison, int numadressefacturation, int codepostallivraison, int codepostalfacturation, int IDpersonnel, int IDclient)
{
System::String^ sql;
this->oMappClient->setNom(nom);
this->oMappClient->setPrenom(prenom);
this->oMappClient->setDateNaissance(datenaissance);
this->oMappClient->setDatePremierAchat(datepremierachat);
this->oMappClient->setAdresseLivraison(adresselivraison);
this->oMappClient->setAdresseFacturation(adressefacturation);
this->oMappClient->setNomSociete(nomsociete);
this->oMappClient->setAdresseSociete(adressesociete);
this->oMappClient->setNumServiceClient(numserviceclient);
this->oMappClient->setNumAdresseLivraison(numadresselivraison);
this->oMappClient->setNumAdresseFacturation(numadressefacturation);
this->oMappClient->setCodePostalLivraison(codepostallivraison);
this->oMappClient->setCodePostalFacturation(codepostalfacturation);
this->oMappClient->setIDpersonnel(IDpersonnel);
this->oMappClient->setIDclient(IDclient);
sql = this->oMappClient->UpdateClient();
this->oCad->actionRows(sql);
}
void NS_Comp_Svc::CLservicesClient::SupprimerClient(int clientID)
{
System::String^ sql;
sql = this->oMappClient->DeleteClient(clientID);
this->oCad->actionRows(sql);
};