Exemplo n.º 1
0
        public ActionResult EditContact(ContactModel model)
        {
            //check model state
            if (ModelState.IsValid)
            {
                ContactProcessor.AlterContact(model.Id, model.FirstName, model.LastName, model.Company, model.Phone, model.Email);
                //load the view contacts page
                return(RedirectToAction("ViewContacts"));
            }

            //reload page
            return(View());
        }