Пример #1
0
        public IActionResult ProceedToCheckout(ProceedToCheckoutViewModel postModel)
        {
            var dboCustomer = new CustomerDBO();

            dboCustomer.ID             = postModel.ID;
            dboCustomer.firstname      = postModel.firstname;
            dboCustomer.lastname       = postModel.lastname;
            dboCustomer.Email          = postModel.Email;
            dboCustomer.address        = postModel.address;
            dboCustomer.city           = postModel.city;
            dboCustomer.zipcode        = postModel.zipcode;
            dboCustomer.cardnumber     = postModel.cardnumber;
            dboCustomer.expirationdate = postModel.expirationdate;
            dboCustomer.cvv            = postModel.cvv;
            dboCustomer.subtotal       = postModel.subtotal;
            dboCustomer.grandtotal     = postModel.grandtotal;


            _CustomerRepository.InsertCustomer(dboCustomer);

            return(RedirectToAction(nameof(CartController.CartItems)));
        }