Ejemplo n.º 1
0
        public async Task <ActionResult> Create(Models.Address address)
        {
            if (ModelState.IsValid)
            {
                address.CustomerId = User.Identity.GetUserId();
                address.Id         = Guid.NewGuid();
                await _address.AddAddress(address);

                return(RedirectToAction("Index"));
            }

            return(View(address));
        }
Ejemplo n.º 2
0
        public IActionResult FulfillAddress(AddressIndexListingModel model, int OrderId)
        {
            Console.WriteLine(" ????????????????????PONEIJZS???????????????????????????????//// ");
            Address address = new Address()
            {
                Street           = model.Street,
                StreetNumber     = model.StreetNumber,
                AppartmentNumber = model.AppartmentNumber,
                PostCode         = model.PostCode,
                City             = model.City,
                Country          = model.Country
            };

            _address.AddAddress(address);
            _address.AddAddressToOrder(address.Id, OrderId);

            return(RedirectToAction("FulfillClient", "Client", new { OrderId = OrderId }));
            //return View();
        }
Ejemplo n.º 3
0
 public void AddAddress(Address address)
 {
     iaddress.AddAddress(address);
 }