Exemplo n.º 1
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            EventInfo = await _eventsService.GetWithProductsAsync(id);

            if (EventInfo == null)
            {
                return(NotFound());
            }

            PaymentMethods = await _paymentMethodService.GetActivePaymentMethodsAsync();

            Registration = new RegisterVM(EventInfo, DefaultPaymentMethod);

            return(Page());
        }
Exemplo n.º 2
0
 public async Task <IActionResult> OnGetAsync()
 {
     ViewData["EventInfoId"]   = new SelectList(_context.EventInfos, "EventInfoId", "Code");
     ViewData["PaymentMethod"] = new SelectList(await _paymentMethods.GetActivePaymentMethodsAsync(), "Provider", "Name");
     ViewData["UserId"]        = new SelectList(_context.ApplicationUsers, "Id", "Id");
     return(Page());
 }
 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.ListUsers(), "Id", "Id");
     return(Page());
 }
Exemplo n.º 4
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            EventInfo = await _eventsService.GetEventInfoByIdAsync(id, new EventInfoRetrievalOptions
            {
                LoadProducts = true
            });

            if (EventInfo == null)
            {
                return(NotFound());
            }

            PaymentMethods = await _paymentMethodService.GetActivePaymentMethodsAsync();

            Registration = new RegisterVM(EventInfo, DefaultPaymentMethod);

            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.Orders)
                           .Include(r => r.User).SingleOrDefaultAsync(m => m.RegistrationId == id);

            PaymentMethods = await _paymentMethods.GetActivePaymentMethodsAsync();

            if (Registration == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Exemplo n.º 6
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());
        }