50 lines
1.9 KiB
PHP
Executable File
50 lines
1.9 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Typeapporteur.php';
|
|
require_once 'Modele/Tableaucommission.php';
|
|
require_once 'Modele/Menuvueutilisateur.php';
|
|
|
|
class ControleurTableaucommission extends Controleur {
|
|
private $typeapporteur;
|
|
private $Tableaucommission;
|
|
|
|
public function __construct() {
|
|
$this->menuvue = new Menuvueutilisateur();
|
|
$this->menuvue->getMenuVue("Tableaucommission");
|
|
|
|
$this->typeapporteur = new Typeapporteur();
|
|
$this->tableaucommission = new Tableaucommission();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$typeapporteurs = $this->typeapporteur->getListeTypeapporteurs();
|
|
|
|
$this->genererVue(array('typeapporteurs' => $typeapporteurs));
|
|
}
|
|
|
|
public function detailcommission()
|
|
{
|
|
$codeTypeApporteur = $this->requete->getParametreFormulaire("codeTypeApporteur");
|
|
|
|
$typeapporteur = $this->typeapporteur->getUnTypeApporteur($codeTypeApporteur);
|
|
$tableaucommission = $this->tableaucommission->gettableaucommissiontype($codeTypeApporteur);
|
|
|
|
$this->genererVueAjax(array('typeapporteur' => $typeapporteur, 'tableaucommission' => $tableaucommission));
|
|
}
|
|
|
|
public function enregistrerdetailcommission()
|
|
{
|
|
/*
|
|
idTableaucommission, codeTypeApporteur, codeTypeContrat, codeEtape, tauxCommission
|
|
*/
|
|
$idTableaucommission= $this->requete->getParametreFormulaire("idTableaucommission", "numerique");
|
|
$codeTypeApporteur = $this->requete->getParametreFormulaire("codeTypeApporteur");
|
|
$codeTypeContrat = $this->requete->getParametreFormulaire("codeTypeContrat");
|
|
$codeEtape = $this->requete->getParametreFormulaire("codeEtape");
|
|
$tauxCommission = $this->requete->getParametreFormulaire("tauxCommission", "numerique");
|
|
|
|
$this->tableaucommission->enregistrerdetailcommission($idTableaucommission, $codeTypeApporteur, $codeTypeContrat, $codeEtape, $tauxCommission);
|
|
}
|
|
|
|
} |