public async Task <IActionResult> OnGetAsync() { ViewData["EventInfoId"] = new SelectList(await _eventInfoRetrievalService.GetAllEventsAsync(), "EventInfoId", "Slug"); ViewData["PaymentMethod"] = new SelectList(await _paymentMethods.GetActivePaymentMethodsAsync(), "Provider", "Name"); ViewData["UserId"] = new SelectList(await _userListingService.ListUsersAsync(), "Id", "Id"); return(Page()); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Product = await _context.Products .Include(p => p.EventInfo).SingleOrDefaultAsync(m => m.ProductId == id); if (Product == null) { return(NotFound()); } ViewData["EventInfoId"] = new SelectList(await _eventInfoRetrievalService.GetAllEventsAsync(), "EventInfoId", "Slug"); return(Page()); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Registration = await _context.Registrations .Include(r => r.EventInfo) .Include(r => r.User) .SingleOrDefaultAsync(m => m.RegistrationId == id); if (Registration == null) { return(NotFound()); } ViewData["EventInfoId"] = new SelectList(await _eventInfoRetrievalService.GetAllEventsAsync(), "EventInfoId", "Slug"); ViewData["PaymentMethod"] = new SelectList(await _paymentMethods.GetActivePaymentMethodsAsync(), "Provider", "Name"); ViewData["UserId"] = new SelectList(await _userListingService.ListUsersAsync(), "Id", "Id"); return(Page()); }
public async Task <IActionResult> OnGet() { ViewData["EventInfoId"] = new SelectList(await _eventInfoRetrievalService.GetAllEventsAsync(), "EventInfoId", "Slug"); return(Page()); }