Beispiel #1
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Delivery_Service = await _context.Delivery_Service
                               .Include(d => d.order).FirstOrDefaultAsync(m => m.id_deliverman == id);

            if (Delivery_Service == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Beispiel #2
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Delivery_Service = await _context.Delivery_Service
                               .Include(d => d.order).FirstOrDefaultAsync(m => m.id_deliverman == id);

            if (Delivery_Service == null)
            {
                return(NotFound());
            }
            ViewData["Order_id_order"] = new SelectList(_context.Order, "id_order", "id_order");
            return(Page());
        }
Beispiel #3
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

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

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

            return(RedirectToPage("./Index"));
        }