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