Ejemplo n.º 1
0
        public async Task <IActionResult> OnPost(PaymentDTO ReservationDetails)
        {
            BillingDataDTO billingData = await reservationManager.GetBillingData(ReservationDetails.BillingDataId);

            if (billingData == null)
            {
                await reservationManager
                .AddBillingData(new BillingDataDTO {
                    Address   = ReservationDetails.Address,
                    City      = ReservationDetails.City,
                    FirstName = ReservationDetails.FirstName,
                    LastName  = ReservationDetails.LastName,
                    Country   = ReservationDetails.Country,
                    Postal    = ReservationDetails.Postal,
                    Company   = ReservationDetails.Company,
                    State     = ReservationDetails.State
                });
            }
            await reservationManager.MakeReservation(ReservationDetails);

            return(Redirect("/Profile"));
        }