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

42 lines
1.6 KiB
PHP

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Bonpec.php';
class ControleurAjaxrequetebonpec extends Controleur
{
private $bonpec;
public function __construct() {
$this->bonpec = new Bonpec();
}
public function index()
{
// Ligne 1
$codePrestataire = $this->requete->getParametreFormulaire("codePrestataire");
$codeTypeBon = $this->requete->getParametreFormulaire("codeTypeBon");
$codeEtatBon = $this->requete->getParametreFormulaire("codeEtatBon");
// Ligne 2
$numeroAdherent = $this->requete->getParametreFormulaire("numeroAdherent");
$numeroBeneficiaire = $this->requete->getParametreFormulaire("numeroBeneficiaire");
$numeroBon1 = $this->requete->getParametreFormulaire("numeroBon1");
$numeroBon2 = $this->requete->getParametreFormulaire("numeroBon2");
// Ligne 3
$adherent = $this->requete->getParametreFormulaire("adherent");
$beneficiaire = $this->requete->getParametreFormulaire("beneficiaire");
// FIN Champs
$_SESSION['p_codePrestataire_C'] = $codePrestataire;
$bonpecs = $this->bonpec->requetesbonpec($codePrestataire, $codeTypeBon, $codeEtatBon,
$numeroAdherent, $numeroBeneficiaire, $numeroBon1, $numeroBon2, $adherent, $beneficiaire) ;
$bonpecs_total = $this->bonpec->requetesbonpectotal($codePrestataire, $codeTypeBon, $codeEtatBon,
$numeroAdherent, $numeroBeneficiaire, $numeroBon1, $numeroBon2, $adherent, $beneficiaire) ;
$this->genererVueAjax(array('bonpecs' => $bonpecs, 'bonpecs_total' => $bonpecs_total));
}
}