Ejemplo n.º 1
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            TransactionArgent = await _context.TransactionArgent.FindAsync(id);

            if (TransactionArgent != null)
            {
                _context.TransactionArgent.Remove(TransactionArgent);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            TransactionArgent = await _context.TransactionArgent
                                .Include(t => t.JoueurNavigation)
                                .Include(t => t.RepasNavigation)
                                .Include(t => t.RepasNavigation.Repas1Navigation)
                                .FirstOrDefaultAsync(m => m.Id == id);

            if (TransactionArgent == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            TransactionArgent = await _context.TransactionArgent
                                .Include(t => t.JoueurNavigation)
                                .Include(t => t.RepasNavigation)
                                .Include(t => t.RepasNavigation.Repas1Navigation)
                                .FirstOrDefaultAsync(m => m.Id == id);

            if (TransactionArgent == null)
            {
                return(NotFound());
            }

            ViewData["Joueur"] = new SelectList(_context.Joueurs, "Id", "Nom");
            ViewData["Repas"]  = new SelectList(_context.Repas.Include(t => t.Repas1Navigation), "Id", "Identity");

            return(Page());
        }