prestation/Controleur/ControleurAjaxtbajoutergarantiesproduction.php
2025-12-01 18:54:33 +00:00

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);
}
}