public ActionResult AlterarDados(FormCollection collection) { try { if (ModelState.IsValid) { Empresa empresa = new Empresa(); TryUpdateModel <Empresa>(empresa, collection.ToValueProvider()); SessionHelper.Set(SessionKeys.Pessoa, empresa); gerenciador.Editar(empresa); return(RedirectToAction("Index")); } return(View()); } catch (NegocioException n) { throw new ControllerException("Erro ao tentar alterar as informações do objeto.", n); } catch (Exception e) { throw new ControllerException("Erro ao tentar alterar as informações do objeto.", e); } }