public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            _db.Attach(Filiere).State = EntityState.Modified;

            try
            {
                await _db.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!FiliereExists(Filiere.id_fil))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(RedirectToPage("./IndexF"));
        }
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            _db.Seances.Add(Seance);
            await _db.SaveChangesAsync();

            return(RedirectToPage("./IndexS"));
        }
Exemple #3
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Matiere = await _db.Matieres.FindAsync(id);

            if (Matiere != null)
            {
                _db.Matieres.Remove(Matiere);
                await _db.SaveChangesAsync();
            }

            return(RedirectToPage("IndexM"));
        }
Exemple #4
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Professeur = await _db.Professeurs.FindAsync(id);

            if (Professeur != null)
            {
                _db.Professeurs.Remove(Professeur);
                await _db.SaveChangesAsync();
            }

            return(RedirectToPage("IndexP"));
        }
Exemple #5
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            etudiant = await _db.Etudiants.FindAsync(id);

            if (etudiant != null)
            {
                _db.Etudiants.Remove(etudiant);
                await _db.SaveChangesAsync();
            }

            return(RedirectToPage("IndexE"));
        }