z
This commit is contained in:
32
Controleur/ControleurAjaxbeneficiaireprimeadherent.php
Normal file
32
Controleur/ControleurAjaxbeneficiaireprimeadherent.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Emission.php';
|
||||
|
||||
class ControleurAjaxbeneficiaireprimeadherent extends Controleur
|
||||
{
|
||||
private $emission;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->emission = new Emission();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$idAdherent = $_SESSION['idAdherent_C'];
|
||||
|
||||
$debutPeriode = $this->requete->getParametreDate("debutPeriode");
|
||||
$finPeriode = $this->requete->getParametreDate("finPeriode");
|
||||
|
||||
$beneficiaires = $this->emission->getbeneficiaireprimeadherent($idAdherent, $debutPeriode, $finPeriode);
|
||||
|
||||
$beneficiaires_total = null;
|
||||
|
||||
if(count($beneficiaires)>"0")
|
||||
{
|
||||
$beneficiaires_total = $beneficiaires['0'];
|
||||
}
|
||||
|
||||
$this->genererVueAjax(array('beneficiaires' => $beneficiaires, 'beneficiaires_total' => $beneficiaires_total));
|
||||
}
|
||||
}
|
||||
40
Controleur/ControleurBeneficiaireprimeadherent.php
Normal file
40
Controleur/ControleurBeneficiaireprimeadherent.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Emission.php';
|
||||
require_once 'Modele/Adherent.php';
|
||||
require_once 'Modele/Menuvueutilisateur.php';
|
||||
|
||||
|
||||
class ControleurBeneficiaireprimeadherent extends Controleur
|
||||
{
|
||||
private $adherent;
|
||||
private $emission;
|
||||
|
||||
public function __construct() {
|
||||
$this->menuvue = new Menuvueutilisateur();
|
||||
$this->menuvue->getMenuVue("Beneficiaireprimeadherent");
|
||||
|
||||
$this->adherent = new Adherent();
|
||||
$this->emission = new Emission();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$idAdherent = $_SESSION['idAdherent_C'];
|
||||
|
||||
$adherent = $this->adherent->getAdherentId($idAdherent);
|
||||
$debutPeriode = $adherent['dateEffetAdherent'];
|
||||
$finPeriode = $adherent['dateFinPolice'];
|
||||
|
||||
$beneficiaires = $this->emission->getbeneficiaireprimeadherent($idAdherent, $debutPeriode, $finPeriode);
|
||||
|
||||
$beneficiaires_total = null;
|
||||
|
||||
if(count($beneficiaires)>"0")
|
||||
{
|
||||
$beneficiaires_total = $beneficiaires['0'];
|
||||
}
|
||||
|
||||
$this->genererVue(array('adherent' => $adherent, 'beneficiaires' => $beneficiaires, 'beneficiaires_total' => $beneficiaires_total));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user