public virtual ActionResult Editar(TClient model) { try { model.Edit(); TPreference.SavePreference(model); TempData["Alerta"] = new Alert("success", "Cliente alterado com sucesso"); return(RedirectToAction("Index")); } catch (SimpleValidationException ex) { ViewBag.MostraSenha = false; ViewBag.EnumProfileClient = EnumHelper.ListAll <ProfileClient>().ToSelectList(x => x, x => x.Description()); return(HandleViewException(model, ex)); } }