71 lines
2.1 KiB
PHP
71 lines
2.1 KiB
PHP
<?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['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->ajoutermedicament($idMedicament);
|
|
$this->prescription->ajoutermedicamentcso($idMedicament);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function ajoutermedicamenttous()
|
|
{
|
|
// $this->prescription->ajoutermedicamenttous();
|
|
$this->prescription->ajoutermedicamenttouscso();
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function retirermedicament()
|
|
{
|
|
$idMedicament = $this->requete->getParametreFormulaire("idMedicament");
|
|
|
|
// $this->prescription->retirermedicament($idMedicament);
|
|
$this->prescription->retirermedicamentcso($idMedicament);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function retirermedicamenttous()
|
|
{
|
|
// $this->prescription->retirermedicamenttous();
|
|
$this->prescription->retirermedicamenttouscso();
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function enregistrerpharmacie()
|
|
{
|
|
$this->prescription->enregistrerpharmacie();
|
|
}
|
|
|
|
} |