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

            Order = await _context.OrderList
                    .Include(o => o.PaymentType).FirstOrDefaultAsync(m => m.OrderID == id);

            if (Order == null)
            {
                return(NotFound());
            }
            ViewData["PaymentID"] = new SelectList(_context.Set <PaymentType>(), "PaymentTypeID", "PaymentTypeID");
            return(Page());
        }
コード例 #2
0
 public IActionResult OnGet()
 {
     ViewData["PaymentID"] = new SelectList(_context.Set <PaymentType>(), "PaymentTypeID", "PaymentTypeID");
     return(Page());
 }