// GET: /Eval/CreateResultat
        public ActionResult CreateResultat()
        {
            ResultatModels model;

            using (ResultatRepository repository = new ResultatRepository())
            {
                IQueryable <Evaluations> evaluations = repository.GetEvaluations();
                IQueryable <Pupils>      pupils      = repository.GetEleves();
                model = new ResultatModels
                {
                    mode        = -1,
                    eleves      = getListEleves(pupils),
                    evaluations = getListEvaluations(evaluations)
                };
            }
            return(View(model));
        }
        public ActionResult EditResultat(Guid id)
        {
            ResultatModels model;

            using (ResultatRepository repository = new ResultatRepository())
            {
                Results x = repository.GetResultById(id);
                IQueryable <Evaluations> evaluations = repository.GetEvaluations();
                IQueryable <Pupils>      pupils      = repository.GetEleves();
                if (x == null)
                {
                    return(HttpNotFound());
                }
                model = new ResultatModels
                {
                    mode         = 0,
                    id           = x.Id,
                    evaluationId = x.Evaluation_Id,
                    note         = x.Note,
                    pupilId      = x.Pupil_Id
                };
            }
            return(View("CreateResultat", model));
        }