Beispiel #1
0
 /** L'annee actuel. Est utilisee pour recuperer les lignes bugetaires de l'exercice en cours */
 public Integer currentAnnee() {
   if (currentAnnee == null) {
     currentAnnee =
         new Integer(Integer.parseInt("20" + DateCtrl.currentDateString().substring(6, 8)));
   }
   return currentAnnee;
 }
 /** L'action de creer le poste */
 public WOComponent doCreatePoste() {
   if (isFormValid()) {
     // creer le poste
     EOPoste newPoste =
         EOPoste.newRecordInContext(
             ec(), inNewPosteService, newPosCode, newPosLibelle, newPosDDebut, newPosDFin);
     // creer l'occupation
     if (isCreatingFromExistingAffectation) {
       EOAffectationDetail.newRecordInContext(
           ec(), newPosAffectation, newPoste, newPosDDebut, newPosDFin, false);
     }
     // creer la fiche de poste (uniquement pour les postes non enseignants)
     if (isCreatingFicheDePoste && newPoste.isNonEnseignant()) {
       EOFicheDePoste.newRecordInContext(ec(), newPoste, newPosDDebut, newPosDFin);
     }
     // creer la fiche lolf
     EOFicheLolf.newRecordInContext(
         // ec(), newPoste, FinderExercice.getExercicePourDate(ec(), DateCtrl.now()));
         ec(), newPoste, FinderExercice.getExerciceDepensePourDate(ec(), DateCtrl.now()));
     // enregistrement
     try {
       UtilDb.save(ec(), "");
     } catch (Throwable e) {
       e.printStackTrace();
     }
     // on retourne sur la liste des postes en rafraichissant son contenu
     ((I_CallingCompPosteMetaData) caller).doAfterCompPosteMetaDataSuccess();
     return null;
   } else {
     return null;
   }
 }