32 lines
891 B
PHP
32 lines
891 B
PHP
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Tabgarantiesproduction.php';
|
|
|
|
class ControleurAjaxtbajoutergarantiesproduction extends Controleur {
|
|
private $garantie;
|
|
|
|
public function __construct(){
|
|
$this->garantie = new Tabgarantiesproduction();
|
|
}
|
|
|
|
public function index() {
|
|
$garantie = $this->garantie->getgarantie();
|
|
$produit = $this->garantie->getproduit();
|
|
|
|
$this->genererVueAjax(array(
|
|
'garantie' => $garantie,
|
|
'produit' => $produit
|
|
));
|
|
}
|
|
|
|
public function ajouter(){
|
|
$codeProduit = $this->requete->getParametreFormulaire("codeProduit");
|
|
$codeGarantie = $this->requete->getParametreFormulaire("codeGarantie");
|
|
|
|
$this->garantie->ajoutergarantiesproduction($codeProduit,$codeGarantie);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|