86 lines
2.4 KiB
PHP
Executable File
86 lines
2.4 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Detailprescription.php';
|
|
require_once 'Modele/Prescription_temp.php';
|
|
|
|
class ControleurAjaxdetailpharmacie extends Controleur {
|
|
private $prescription;
|
|
private $detailprescription;
|
|
|
|
public function __construct() {
|
|
$this->prescription = new Prescription_temp();
|
|
$this->detailprescription = new Detailprescription();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$numeroPrescription = $_SESSION['p_numeroPrescription_C'];
|
|
|
|
$prescription = $this->prescription->getprescription();
|
|
|
|
$detailprescriptions = $this->detailprescription->getdetailprescription($numeroPrescription);
|
|
|
|
$detailnonlivres = $this->prescription->getdetailnonlivre();
|
|
|
|
// $detaillivres = $this->prescription->getdetaillivre();
|
|
$detaillivres = $this->prescription->getdetaillivrecso();
|
|
|
|
$this->genererVueAjax(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions,
|
|
'detailnonlivres' => $detailnonlivres, 'detaillivres' => $detaillivres));
|
|
}
|
|
|
|
public function ajoutermedicament()
|
|
{
|
|
$idMedicament = $this->requete->getParametreFormulaire("idMedicament");
|
|
|
|
$this->prescription->ajoutermedicamentcso($idMedicament);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function ajoutermedicamenttous()
|
|
{
|
|
$this->prescription->ajoutermedicamenttouscso();
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function retirermedicament()
|
|
{
|
|
$idMedicament = $this->requete->getParametreFormulaire("idMedicament");
|
|
|
|
$this->prescription->retirermedicamentcso($idMedicament);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function retirermedicamenttous()
|
|
{
|
|
$this->prescription->retirermedicamenttouscso();
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function enregistrerpharmacie()
|
|
{
|
|
$this->prescription->enregistrerpharmacie();
|
|
}
|
|
|
|
public function demanderaccordpha()
|
|
{
|
|
$idMedicament = $this->requete->getParametreFormulaire("idMedicament");
|
|
|
|
$this->detailprescription->demanderaccordpha($idMedicament);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function majquantitecso()
|
|
{
|
|
$idLivre = $this->requete->getParametre("idLivre");
|
|
$quantite = $this->requete->getParametreFormulaire("quantite", "numerique");
|
|
|
|
$this->detailprescription->majquantitecso($idLivre, $quantite);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
} |