radiantproduction/Controleur/ControleurAjaxgarantiescollegeadd.php

83 lines
2.7 KiB
PHP

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/College_temp.php';
class ControleurAjaxgarantiescollegeadd extends Controleur {
private $college_temp;
public function __construct() {
$this->college_temp = new College_temp();
}
public function index()
{
$idCollegeTemp = $_SESSION['idCollegeTemp'];
$garantiesadd = $this->college_temp->getGarAddCollege($idCollegeTemp);
$this->genererVueAjax(array('garantiesadd' => $garantiesadd));
}
public function majplafondadd()
{
$idGarantie = $this->requete->getParametre("idGarantie");
$plafond = $this->requete->getParametreFormulaire("plafond","numerique");
$this->college_temp->majplafondadd($idGarantie, $plafond);
$this->executerAction("index");
}
public function majprimeadd()
{
$primeOption = $this->requete->getParametreFormulaire("primeOption","numerique");
$idGarantie = $this->requete->getParametre("idGarantie");
$this->college_temp->majprimeadd($idGarantie, $primeOption);
$this->executerAction("index");
}
public function majplafondadherentadd()
{
$idCollegeTemp = $this->requete->getParametre("idCollegeTemp");
$plafond = $this->requete->getParametreFormulaire("plafond","numerique");
$this->college_temp->majplafondadherentadd($idCollegeTemp, $plafond);
$this->executerAction("afficherplafondglobal");
}
public function afficherplafondglobal()
{
$idCollegeTemp = $_SESSION['idCollegeTemp'];
$limiteadd = $this->college_temp->getLimiteAddCollege($idCollegeTemp);
$this->genererVueAjax(array('limiteadd' => $limiteadd));
}
public function majprimeadherentadd()
{
$idCollegeTemp = $this->requete->getParametre("idCollegeTemp");
$prime = $this->requete->getParametreFormulaire("prime","numerique");
$this->college_temp->majprimeadherentadd($idCollegeTemp, $prime);
$this->executerAction("afficherplafondglobal");
}
public function majplafondbeneficiaireadd()
{
$idCollegeTemp = $this->requete->getParametre("idCollegeTemp");
$plafond = $this->requete->getParametreFormulaire("plafond","numerique");
$this->college_temp->majplafondbeneficiaireadd($idCollegeTemp, $plafond);
$this->executerAction("afficherplafondglobal");
}
public function majprimebeneficiaireadd()
{
$idCollegeTemp = $this->requete->getParametre("idCollegeTemp");
$prime = $this->requete->getParametreFormulaire("prime","numerique");
$this->college_temp->majprimebeneficiaireadd($idCollegeTemp, $prime);
$this->executerAction("afficherplafondglobal");
}
}