public async Task <IActionResult> Edit(int id, [Bind("Id,GradeId,SujetId,QuestionText,Difficult,Explanation,GoodAnswers,BadAnswers")] Question question)
        {
            if (id != question.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(question);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!QuestionExists(question.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["GradeId"] = new SelectList(_context.Grade, "Id", "Id", question.GradeId);
            ViewData["SujetId"] = new SelectList(_context.Sujet, "Id", "Id", question.SujetId);
            return(View(question));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,GradeId,ProfilId,DifficulteMaths,Xpmaths,DifficulteFrancais,Xpfrancais,DifficulteAnglais,Xpanglais")] Progression progression)
        {
            if (id != progression.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(progression);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ProgressionExists(progression.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["GradeId"]  = new SelectList(_context.Grade, "Id", "Nom", progression.GradeId);
            ViewData["ProfilId"] = new SelectList(_context.Profil, "Id", "Nom", progression.ProfilId);
            return(View(progression));
        }