99 lines
3.2 KiB
PHP
99 lines
3.2 KiB
PHP
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Ouinon.php';
|
|
require_once $_SESSION['dossierSociete'].'/Tarifs/Modele/College_temp.php';
|
|
|
|
class ControleurAjaxgarantiescollege extends Controleur {
|
|
private $garantie;
|
|
private $ouinon;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->college_temp = new College_temp();
|
|
$this->ouinonimposerplafond = (new Ouinon())->getListe();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$idCollegeTemp = $_SESSION['idCollegeTemp'];
|
|
|
|
$garantiesbase = $this->college_temp->getGarBaseCollege($idCollegeTemp);
|
|
$garoptionnelles = $this->college_temp->getGarOptCollege($idCollegeTemp);
|
|
$garoptacquises = $this->college_temp->getGarOptCollegeAcq($idCollegeTemp);
|
|
|
|
$this->genererVueAjax(array('garantiesbase' => $garantiesbase, 'garoptionnelles' => $garoptionnelles, 'garoptacquises' => $garoptacquises,
|
|
'ouinonimposerplafond' => $this->ouinonimposerplafond));
|
|
}
|
|
|
|
public function ajoutergarantie()
|
|
{
|
|
$idCollegeTemp = $_SESSION['idCollegeTemp'];
|
|
$codeGarantie = $this->requete->getParametre("codeGarantie");
|
|
|
|
$this->college_temp->ajouterUneGarantie($idCollegeTemp, $codeGarantie);
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function supprimergarantie()
|
|
{
|
|
$idGarantie = $this->requete->getParametre("idGarantie");
|
|
$this->college_temp->supprimergarantie($idGarantie);
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
|
|
public function majtauxplafond()
|
|
{
|
|
$idGarantie = $this->requete->getParametre("idGarantie");
|
|
$tauxPlafond = $this->requete->getParametreFormulaire("tauxPlafond");
|
|
$this->college_temp->majtauxplafond($idGarantie, $tauxPlafond);
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function imposerplafond()
|
|
{
|
|
$idGarantie = $this->requete->getParametre("idGarantie");
|
|
$plafond = $this->requete->getParametreFormulaire("plafond");
|
|
$this->college_temp->imposerplafond($idGarantie, $plafond);
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function majprimeopt()
|
|
{
|
|
$primeOption = $this->requete->getParametreFormulaire("primeOption","numerique");
|
|
$idGarantie = $this->requete->getParametre("idGarantie");
|
|
|
|
$this->college_temp->majPrimeOpt($idGarantie, $primeOption);
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function majplafondopt()
|
|
{
|
|
$plafondOption = $this->requete->getParametreFormulaire("plafond","numerique");
|
|
$idGarantie = $this->requete->getParametre("idGarantie");
|
|
|
|
$this->college_temp->majPlafondOpt($idGarantie, $plafondOption);
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
|
|
public function majlibgar()
|
|
{
|
|
$idGarantie = $this->requete->getParametre("idGarantie");
|
|
$libellegarantie = $this->requete->getParametreFormulaire("libellegarantie");
|
|
$this->college_temp->majlibgar($idGarantie, $libellegarantie);
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function majchampapplicationplafond()
|
|
{
|
|
$idGarantie = $this->requete->getParametre("idGarantie");
|
|
$choix = $this->requete->getParametre("choix");
|
|
|
|
// throw new Exception("choix: '$choix'");
|
|
// exit();
|
|
|
|
$this->college_temp->majchampapplicationplafond($idGarantie, $choix);
|
|
}
|
|
|
|
} |