示例#1
0
        public Eleve getOneEleveById(int id)
        {
            EleveQuery    eq = new EleveQuery(contexte);
            NoteQuerry    nq = new NoteQuerry(contexte);
            AbsenceQuerry aq = new AbsenceQuerry(contexte);
            Eleve         e  = eq.GetOne(id);

            e.Notes = nq.GetAllByEleveId(e.Id).ToList() != null?nq.GetAllByEleveId(e.Id).ToList() : new List <Note>();

            e.GetMoyenne();
            e.Absences = aq.GetAllByEleveId(e.Id).ToList() != null?aq.GetAllByEleveId(e.Id).ToList() : new List <Absence>();

            return(e);
        }
示例#2
0
        public Eleve GetOneEleve(int id)
        {
            EleveQuery eq = new EleveQuery(context);

            Eleve e = eq.GetOne(id);

            NoteQuery nq = new NoteQuery(context);

            e.Notes = nq.GetByEleveId(id).ToList();
            AbsenceQuery aq = new AbsenceQuery(context);

            e.Absences = aq.GetByEleveId(id).ToList();

            return(e);
        }