Esempio n. 1
0
        public ActionResult Index(int customerId)
        {
            var model = new ContactResponseModel();
            model.CustomerId = customerId;

            return View(model);
        }
Esempio n. 2
0
        public ActionResult Index(ContactResponseModel contactResponse)
        {
            if (ModelState.IsValid)
            {
                var customer = new Customer();
                customer.FirstName = contactResponse.FirstName;
                customer.LastName = contactResponse.Surname;
                customer.Email = contactResponse.Email;

                _db.Save();

                return RedirectToAction("Success", "contact", new { id = contactResponse.CustomerId });
                //return View("Success", contactResponse);
            }
            else
            {
                return View();
            }
        }