protected void PreencheCampos(int idUsuario) { try { ValueObjectLayer.Usuario ObjUsuario = new ValueObjectLayer.Usuario(idUsuario); ValueObjectLayer.Usuario SssUsuario = (ValueObjectLayer.Usuario)Session["UsuarioLogado"]; ValueObjectLayer.Empresa empresa = EmpresaFacade.RecuperaEmpresa(new ValueObjectLayer.Empresa()); //ObjUsuario.Empresa = empresa; ValueObjectLayer.Usuario usuario = UsuarioFacade.RecuperarUsuario(ObjUsuario); ValueObjectLayer.Perfil_Usuario perfilUsuario = UsuarioPerfilFacade.RecuperarPerfilUsuario(usuario.Id); if (perfilUsuario != null) { ddlPerfil.SelectedValue = perfilUsuario._Perfil.Id.ToString(); } else { ddlPerfil.SelectedValue = "0"; } txtNome.Text = usuario.Nome; txtEmail.Text = usuario.Email; txtLogin.Text = usuario.Login; if (usuario.Ativo) { lblAtivo.Text = "Sim"; } else { lblAtivo.Text = "Não"; DesabilitaCampos(); } } catch (Exception ex) { throw ex; } }