42 lines
1.2 KiB
PHP
Executable File
42 lines
1.2 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Prescription.php';
|
|
require_once 'Modele/Detailprescription.php';
|
|
|
|
class ControleurAjaxdetailoptique extends Controleur {
|
|
private $prescription;
|
|
private $detailprescription;
|
|
|
|
public function __construct() {
|
|
$this->prescription = new Prescription();
|
|
$this->detailprescription = new Detailprescription();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$numeroPrescription = $_SESSION['p_numeroPrescription_C'];
|
|
|
|
$prescription = $this->prescription->getprescription($numeroPrescription);
|
|
|
|
$detailprescriptions = $this->detailprescription->getdetailprescription($numeroPrescription);
|
|
|
|
$this->genererVueAjax(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions));
|
|
}
|
|
|
|
public function ajoutermedicament()
|
|
{
|
|
$codeMedicament = $this->requete->getParametreFormulaire("codeMedicament");
|
|
|
|
$this->detailprescription->ajoutermedicament($codeMedicament);
|
|
|
|
// $this->executerAction("index");
|
|
}
|
|
|
|
public function supprimer()
|
|
{
|
|
$idOptique = $this->requete->getParametre("idOptique");
|
|
|
|
$this->detailoptique->supprimerverre($idOptique);
|
|
$this->executerAction("index");
|
|
}
|
|
} |