Example #1
0
        // GET: Empresa/Perfil/5
        public ActionResult Perfil(int id)
        {
            int idcliente = ((Usuario)Session["usuario"]).idCliente;

            var RN         = new ZRN.Empresas.Empresas();
            var RNclientes = new ZRN.Clientes.Clientes();

            if (RNclientes.VerificaAcessoEmpresa(id, idcliente) == true)
            {
                var empresaPerfil = new ViewModel.Empresa.EmpresaPerfil();
                empresaPerfil.Empresa          = RN.RetornaPerfilEmpresa(id);
                empresaPerfil.VertentesCliente = RNclientes.RetornaVertentesAssociada(idcliente);

                return(View(empresaPerfil));
            }
            else
            {
                return(RedirectToAction("SemcessoPerfil", "Empresa"));
            }
        }