80 lines
2.3 KiB
PHP
Executable File
80 lines
2.3 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Examen.php';
|
|
require_once 'Modele/Prestationactes.php';
|
|
require_once 'Modele/Garantie.php';
|
|
|
|
|
|
class ControleurAjaxhistoriqueprestation extends Controleur {
|
|
private $examen;
|
|
private $prestationactes;
|
|
private $garantie;
|
|
|
|
public function __construct() {
|
|
|
|
$this->examen = new Examen();
|
|
$this->prestationactes = new Prestationactes();
|
|
$this->garantie = new Garantie();
|
|
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
|
|
$numeroBeneficiaire = $this->requete->getParametreFormulaire("numeroBeneficiaire");
|
|
$beneficiaire = $this->prestationactes->getInfoBeneficiaire($numeroBeneficiaire);
|
|
|
|
$garanties = $this->garantie->getListePourActe();
|
|
|
|
|
|
$this->genererVueAjax(array('beneficiaire' => $beneficiaire, 'garanties' => $garanties));
|
|
|
|
}
|
|
|
|
public function prestations()
|
|
{
|
|
$numeroBeneficiaire = $this->requete->getParametreFormulaire("numeroBeneficiaire");
|
|
|
|
$_SESSION['numeroBeneficiaire'] = $numeroBeneficiaire;
|
|
|
|
$codeGarantie = $this->requete->getParametreFormulaire("codeGarantie");
|
|
|
|
$d1 = $this->requete->getParametreDate("d1");
|
|
$d2 = $this->requete->getParametreDate("d2");
|
|
|
|
|
|
$garanties = $this->garantie->getListePourActe();
|
|
|
|
$historiqueprestations = $this->prestationactes->gethistoriqueprestation($numeroBeneficiaire, $codeGarantie, $d1, $d2);
|
|
|
|
$totalprestations = $this->prestationactes->gettotalprestation($numeroBeneficiaire, $codeGarantie, $d1, $d2);
|
|
|
|
|
|
$this->genererVueAjax(array('garanties' => $garanties,'historiqueprestations' => $historiqueprestations,
|
|
'totalprestations' => $totalprestations));
|
|
|
|
}
|
|
|
|
public function majquantite()
|
|
{
|
|
$idExamen = $this->requete->getParametre("idExamen");
|
|
$quantite = $this->requete->getParametreFormulaire("quantite", "numerique");
|
|
|
|
$tm = intval($_SESSION['tm_C']);
|
|
|
|
$this->examen->majquantite($idExamen, $quantite, $tm);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function supprimer()
|
|
{
|
|
$idExamen = $this->requete->getParametre("idExamen");
|
|
|
|
$this->examen->supprimerexamen($idExamen);
|
|
|
|
$this->examen->updateexamen($_SESSION['numeroFeuilleMaladie_C']);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
} |