Example #1
0
 public IActionResult OnGet()
 {
     ViewData["UEID"]         = new SelectList(_context.Set <UE>(), "ID", "NomComplet");
     ViewData["SalleID"]      = new SelectList(_context.Salle, "ID", "ID");
     ViewData["GroupeID"]     = new SelectList(_context.Groupe, "ID", "Nom");
     ViewData["TypeSeanceID"] = new SelectList(_context.Set <TypeSeance>(), "ID", "Intitule");
     return(Page());
 }
Example #2
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Seance = await _context.Seance
                     .Include(s => s.LUE)
                     .Include(s => s.LaSalle)
                     .Include(s => s.LeGroupe)
                     .Include(s => s.LeTypeSeance).FirstOrDefaultAsync(m => m.ID == id);

            if (Seance == null)
            {
                return(NotFound());
            }
            ViewData["UEID"]         = new SelectList(_context.Set <UE>(), "ID", "ID");
            ViewData["SalleID"]      = new SelectList(_context.Salle, "ID", "ID");
            ViewData["GroupeID"]     = new SelectList(_context.Groupe, "ID", "ID");
            ViewData["TypeSeanceID"] = new SelectList(_context.Set <TypeSeance>(), "ID", "ID");
            return(Page());
        }