Exemple #1
0
 public function saveLeave(Leave $leave)
 {
     try {
         if ($leave->getLeaveId() == '') {
             $idGenService = new IDGeneratorService();
             $idGenService->setEntity($leave);
             $leave->setLeaveId($idGenService->getNextID());
         }
         $leave->save();
         return true;
     } catch (Exception $e) {
         throw new DaoException($e->getMessage());
     }
 }