54 lines
2.2 KiB
PHP
54 lines
2.2 KiB
PHP
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Tabpointvente.php';
|
|
require_once 'Modele/Tablocalite.php';
|
|
|
|
class ControleurAjaxtbmodifierpointvente extends Controleur {
|
|
private $pv;
|
|
private $loc;
|
|
|
|
public function __construct() {
|
|
$this->pv = new Tabpointvente();
|
|
$this->loc = new Tablocalite();
|
|
}
|
|
|
|
public function index() {
|
|
$id = $this->requete->getParametreFormulaire("id");
|
|
$pv = $this->pv->getpointvente($id);
|
|
$typepv = $this->pv->gettypepointvente();
|
|
$pays = $this->loc->getpayslocalite();
|
|
$ville = $this->loc->getvillelocalite($pv['codePays']);
|
|
$localite = $this->pv->getlocalite($pv['codePays'],$pv['codeVille']);
|
|
|
|
$this->genererVueAjax(array(
|
|
'pointvente' => $pv,
|
|
'typepointvente' => $typepv,
|
|
'pays' => $pays,
|
|
'ville' => $ville,
|
|
'localite' => $localite,
|
|
));
|
|
}
|
|
|
|
public function modifier(){
|
|
$id = $this->requete->getParametreFormulaire("id");
|
|
|
|
$codePointVente = strtoupper($this->requete->getParametreFormulaire("codePointVente"));
|
|
$libelle = strtoupper($this->requete->getParametreFormulaire("libelle"));
|
|
$codeTypePointVente = strtoupper($this->requete->getParametreFormulaire("codeTypePointVente"));
|
|
$adresseGeo = $this->requete->getParametreFormulaire("adresseGeo");
|
|
$adressePost = $this->requete->getParametreFormulaire("adressePost");
|
|
$telephone = $this->requete->getParametreFormulaire("telephone");
|
|
$fax = $this->requete->getParametreFormulaire("fax");
|
|
$email = $this->requete->getParametreFormulaire("email");
|
|
$codePays = strtoupper($this->requete->getParametreFormulaire("codePays"));
|
|
$codeVille = strtoupper($this->requete->getParametreFormulaire("codeVille"));
|
|
$codeLocalite = strtoupper($this->requete->getParametreFormulaire("codeLocalite"));
|
|
|
|
$this->pv->modifierpointvente($codePointVente,$libelle,$codeTypePointVente,$adresseGeo,
|
|
$adressePost,$telephone,$fax,$email,$codePays,$codeVille,$codeLocalite,$id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|