예제 #1
0
        public ActionResult DeliveryAddresses()
        {
            GetCustomerRequest customerRequest = new GetCustomerRequest();
            customerRequest.CustomerIdentityToken = _formsAuthentication.GetAuthenticationToken();
            GetCustomerResponse response = _customerService.GetCustomer(customerRequest);
            CustomerDetailView customerDetailView = new CustomerDetailView();

            customerDetailView.Customer = response.Customer;
            customerDetailView.BasketSummary = base.GetBasketSummaryView();

            return View("DeliveryAddresses", customerDetailView);
        }
        public ActionResult Detail(CustomerView customerView)
        {
            ModifyCustomerRequest request = new ModifyCustomerRequest();

            request.CustomerIdentityToken = _formsAuthentication.GetAuthorisationToken();
            request.Email = customerView.EmailAddress;
            request.FirstName = customerView.NameFirstName;
            request.SecondName = customerView.NameSecondName;

            ModifyCustomerResponse response = _customerService.ModifyCustomer(request);

            CustomerDetailView customerDetailView = new CustomerDetailView();

            customerDetailView.Customer = response.Customer;
            customerDetailView.BasketSummary = base.GetBasketSummaryView();

            return View(customerDetailView);
        }