44 lines
1.4 KiB
PHP
Executable File
44 lines
1.4 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Typebon.php';
|
|
require_once 'Modele/Prestataire.php';
|
|
require_once 'Modele/Bonpec.php';
|
|
|
|
class ControleurAjaxafficherbons extends Controleur {
|
|
private $bonpec;
|
|
private $prestataire;
|
|
|
|
public function __construct() {
|
|
$this->bonpec = new Bonpec();
|
|
$this->typebon = new Typebon();
|
|
$this->prestataire = new Prestataire();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$codePrestataire = $this->requete->getParametreFormulaire("codePrestataire");
|
|
$codeTypeBon = $this->requete->getParametre("codeTypeBon");
|
|
$codeEtatBon = $this->requete->getParametreFormulaire("codeEtatBon");
|
|
$noDepart = $this->requete->getParametreFormulaire("noDepart", "numerique");
|
|
$noFin = $this->requete->getParametreFormulaire("noFin", "numerique");
|
|
|
|
$_SESSION['codePrestataire_C'] = $codePrestataire;
|
|
|
|
$bonpecs = $this->bonpec->afficherBonpecs($codePrestataire, $codeTypeBon, $codeEtatBon, $noDepart, $noFin);
|
|
|
|
$this->genererVueAjax(array('bonpecs' => $bonpecs));
|
|
}
|
|
|
|
public function annulerBon() {
|
|
$idBon = $this->requete->getParametreFormulaire("idBon");
|
|
$motifAnnulation = $this->requete->getParametreFormulaire("motifAnnulation");
|
|
|
|
$this->bonpec->annulerBonId($idBon, $motifAnnulation);
|
|
}
|
|
|
|
public function vide()
|
|
{
|
|
$this->genererVueAjax(array());
|
|
}
|
|
|
|
} |