Exemple #1
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            EventInfo = EventInfo ?? await _eventsService.GetWithProductsAsync(id);

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

            PaymentMethods = await _paymentMethodService.GetActivePaymentMethodsAsync();

            Registration = new Web.Pages.Events.Register.RegisterVM(EventInfo, DefaultPaymentMethod);

            return(Page());
        }
Exemple #2
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 Web.Pages.Events.Register.RegisterVM(EventInfo, DefaultPaymentMethod);

            return(Page());
        }