public async Task <IActionResult> OnGetAsync()
 {
     ViewData["EventInfoId"]   = new SelectList(await _eventInfoRetrievalService.ListEventsAsync(), "EventInfoId", "Code");
     ViewData["PaymentMethod"] = new SelectList(await _paymentMethods.GetActivePaymentMethodsAsync(), "Provider", "Name");
     ViewData["UserId"]        = new SelectList(await _userListingService.ListAccessibleUsers(), "Id", "Id");
     return(Page());
 }
Exemple #2
0
        public async Task <IActionResult> GetUsers()
        {
            var users = (await _userRetrievalService.ListAccessibleUsers())
                        .Select(u => new { u.Id, u.Name, u.Email, Phone = u.PhoneNumber })
                        .ToList();

            return(Ok(users));
        }
Exemple #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.ListEventsAsync(), "EventInfoId", "Code");
            ViewData["PaymentMethod"] = new SelectList(await _paymentMethods.GetActivePaymentMethodsAsync(), "Provider", "Name");
            ViewData["UserId"]        = new SelectList(await _userListingService.ListAccessibleUsers(), "Id", "Id");
            return(Page());
        }