Exemplo n.º 1
0
 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());
 }
Exemplo n.º 2
0
        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());
        }
Exemplo n.º 3
0
        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());
        }
Exemplo n.º 4
0
 public async Task <IActionResult> OnGet()
 {
     ViewData["EventInfoId"] = new SelectList(await _eventInfoRetrievalService.GetAllEventsAsync(), "EventInfoId", "Slug");
     return(Page());
 }