Esempio n. 1
0
 public function deleteExamenAction(Request $request, Application $app)
 {
     $id_examen = $request->request->get('id_examen');
     $newExamen = new Examen();
     $newExamen->setIdExamen($id_examen);
     $app['dao.examen']->deleteExamen($newExamen->getIdExamen());
     return $this::deleteExamenIndexAction($request, $app);
 }
Esempio n. 2
0
 public function saveExamen(Examen $_examen)
 {
     $exam = array('examen_name' => $_examen->getExamenName(), 'coeff_examen' => $_examen->getCoeffExamen(), 'date' => $_examen->getDateExamen(), 'description' => $_examen->getDescriptionExamen(), 'semestre' => $_examen->getSemestre(), 'notation' => $_examen->getNotation(), 'id_class' => $_examen->getClass()->getIdClassName(), 'id_discipline' => $_examen->getDiscipline()->getIdDiscipline(), 'dt_create' => $_examen->getDtCreate(), 'dt_update' => $_examen->getDtUpdate());
     //on modifie
     if ($_examen->getIdExamen()) {
         $this->getDb()->update('examen', $exam, array('id_examen' => $_examen->getIdExamen()));
     } else {
         $this->getDb()->insert('examen', $exam);
         //   $_id_examen = $this->getDb()->lastInsertId();
         //   $_examen->setIdExamen($_id_examen);
     }
 }