Exemple #1
0
        public void ClotureretCreerLivret2(CandidatVM pCandidat)
        {
            // CloturerLivret1
            IsLivretClos = true;
            Livret2VM oLiv = new Livret2VM(TheLivret.oDiplome);

            pCandidat.AjoutLivret2(oLiv);
        }
Exemple #2
0
        /// <summary>
        /// Le L1 est valide s'il est accepté et que sa date de validité n'est pas dépassé (3 ans)
        /// OU
        /// S'il est accepté et qu'au moins 1 DC a été validé dans un L2
        /// </summary>
        /// <returns></returns>
        public Boolean IsValide(CandidatVM pCand)
        {
            Boolean bReturn = false;
            //            bReturn = (IsEtatAccepte && DateValidite > DateTime.Now);
            DateTime dDateValid;
            Int32    nDelai = new ContextParam().dbParam.First().DelaiValiditeL1;

            dDateValid = DateValidite.Value.AddDays(nDelai);
            bReturn    = (IsEtatAccepte && (dDateValid > DateTime.Now));

            if (!bReturn)
            {
                if (IsEtatAccepte)
                {
                    CandidatVM oCand = pCand;
                    // Parcours de la Liste des L2
                    foreach (Livret2VM oLiv in oCand.getListLivret2())
                    {
                        if (oLiv.IsDecisionJuryPartielle)
                        {
                            foreach (DCLivretVM oDC in oLiv.lstDCLivretAValider)
                            {
                                // Si un DC a une décision Favorable
                                if (oDC.IsDecisionFavorable)
                                {
                                    bReturn = true;
                                    break;
                                }
                            } // Foreach lstDCaValider
                            if (bReturn)
                            {
                                // Un Dc a une décision favorable => pas la pein d'aller plus loin
                                break;
                            }
                        }
                    }// foreach lstLivret2
                }
            }



            return(bReturn);
        }//IsValide