Esempio n. 1
0
        public async Task <IActionResult> Edit(long id, [Bind("IdSeance,Jourseance,Heuredebut,Heurefin,ClasseId,ProfesseurId,IdSalle")] Model.Seance seance)
        {
            if (id != seance.IdSeance)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(seance);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SeanceExists(seance.IdSeance))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(seance));
        }
        public async Task <IActionResult> Edit(int id, [Bind("IdSalle,Libelle")] Model.Salle Salle)
        {
            if (id != Salle.IdSalle)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(Salle);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SalleExists(Salle.IdSalle))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(Salle));
        }
Esempio n. 3
0
        public async Task <IActionResult> Edit(long id, [Bind("IdProfesseur,Nom,Prenom,Matericule,Dateembauche,MatiereId,UtilisateurId")] Model.Professeur professeur)
        {
            _logger.LogInformation(professeur.UtilisateurId.ToString());
            if (id != professeur.IdProfesseur)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(professeur);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ProfesseurExists(professeur.IdProfesseur))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(professeur));
        }
Esempio n. 4
0
 public async Task <IActionResult> Edit(long id, [Bind("IdEtudiant,Nom,Prenom,Matricule,ClasseIdClasse")] Model.Etudiant etudiant)
 {
     if (id != etudiant.IdEtudiant)
     {
         return(NotFound());
     }
     if (ModelState.IsValid)
     {
         try
         {
             _context.Update(etudiant);
             await _context.SaveChangesAsync();
         }
         catch (DbUpdateConcurrencyException)
         {
             if (!EtudiantExists(etudiant.IdEtudiant))
             {
                 return(NotFound());
             }
             else
             {
                 throw;
             }
         }
         return(RedirectToAction(nameof(Index)));
     }
     return(View(etudiant));
 }
        public async Task <IActionResult> Edit(long id, [Bind("IdAdministrateur,Nom,Prenom,UtilisateurId")] Model.Administrateur Administrateur)
        {
            if (id != Administrateur.IdAdministrateur)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(Administrateur);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AdministrateurExists(Administrateur.IdAdministrateur))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(Administrateur));
        }