Exemplo n.º 1
0
        public ActionResult Edit(CustomerViewModel customer, int id = 0)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(View(customer));
                }

                bool check = DaCustomer.EditCustomer(customer);

                if (check == false)
                {
                    return(View(customer));
                }

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View(customer));
            }
        }