Ejemplo n.º 1
0
        public ListElevesVM()
        {
            _bm     = BusinessLayer.BusinessManager.GetInstance();
            _eleves = new ObservableCollection <DetailEtudiantVM>();

            foreach (Eleve eleve in _bm.GetEleves())
            {
                DetailEtudiantVM detailEtudiant = new DetailEtudiantVM
                {
                    Nom    = eleve.Nom,
                    Prenom = eleve.Prenom
                };

                ICollection <Note> notes = _bm.GetNotesByEleve(eleve.EleveId);
                detailEtudiant.Moyenne = 10;
                _eleves.Add(detailEtudiant);
            }

            if (_eleves != null && _eleves.Count > 0)
            {
                _detail = _eleves.ElementAt(0);
            }
        }