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

            var RNCliente = new ZRN.Clientes.Clientes();

            var verificarAcesso = RNCliente.VerificaAcessoEmpresaVertente(ZRN.Vertentes.enumVertentes.RedesSociais, id, idcliente);

            if (verificarAcesso)
            {
                var RN = new ZRN.Empresas.Empresas();

                var RNSocial          = new ZRN.RedesSociais.Facebook.Facebook();
                var RNSocialTw        = new ZRN.RedesSociais.Twitter.Twitter();
                var RNSocialInsta     = new ZRN.RedesSociais.Instagram.Instagram();
                var RNSocialYoutube   = new ZRN.RedesSociais.Youtube.Youtube();
                var RNtemRedesSociais = new ZRN.RedesSociais.RedesSociais();

                var empresaView = new ViewModel.Empresa.EmpresaSocial();
                empresaView.Empresa                = RN.RetornaPerfilEmpresa(id);
                empresaView.TotalSeguidoresFace    = RNSocial.RetornaSeguidores(id);
                empresaView.TotalSeguidoresTw      = RNSocialTw.RetornaSeguidores(id);
                empresaView.TotalSeguidoresInsta   = RNSocialInsta.RetornaSeguidoresInsta(id);
                empresaView.TotalSeguidoresYoutube = RNSocialYoutube.RetornaSeguidoresYoutube(id);

                empresaView.temRedesSocias = RNtemRedesSociais.VerificaRedesSociaisEmpresas(id);

                return(View(empresaView));
            }
            else
            {
                return(RedirectToAction("redessociais_semAcesso", "Empresa"));
            }
        }
Example #2
0
        public ActionResult PresencaOnline(int id)
        {
            ViewBag.idEmpresa = id;
            var rn         = new ZRN.Empresas.Noticias();
            var rnempresas = new ZRN.Empresas.Empresas();

            int idcliente = ((Usuario)Session["usuario"]).idCliente;
            var RNCliente = new ZRN.Clientes.Clientes();

            var verificarAcesso = RNCliente.VerificaAcessoEmpresaVertente(ZRN.Vertentes.enumVertentes.PresencaOnline, id, idcliente);

            if (verificarAcesso)
            {
                var noticiaView = new ViewModel.Empresa.EmpresaNoticias();

                noticiaView.noticiafonteempresa = rn.RetornaFonteNotciasEmpresa(id);
                noticiaView.empresa             = rnempresas.RetornaDescricaoEmpresa(id);

                return(View(noticiaView));
            }

            else
            {
                return(RedirectToAction("PresencaOnline_semAcesso", "Empresa"));
            }
        }
Example #3
0
        // GET: Empresa/Perfil/5
        public ActionResult LancamentoProduto(int id)
        {
            int idcliente = ((Usuario)Session["usuario"]).idCliente;

            var RNCliente = new ZRN.Clientes.Clientes();

            var verificarAcesso = RNCliente.VerificaAcessoEmpresaVertente(ZRN.Vertentes.enumVertentes.Produtos, id, idcliente);

            if (verificarAcesso)
            {
                var RN          = new ZRN.Empresas.Empresas();
                var empresaView = new ViewModel.Empresa.EmpresaLancamento();
                empresaView.Empresa = RN.RetornaPerfilEmpresa(id);

                return(View(empresaView));
            }
            else
            {
                return(RedirectToAction("produtos_semAcesso", "Empresa"));
            }
        }
Example #4
0
        public ActionResult Promo(int id)
        {
            int idcliente = ((Usuario)Session["usuario"]).idCliente;

            var RNCliente = new ZRN.Clientes.Clientes();

            var verificarAcesso = RNCliente.VerificaAcessoEmpresaVertente(ZRN.Vertentes.enumVertentes.Promocoes, id, idcliente);

            if (verificarAcesso)
            {
                var RNEmpresa = new ZRN.Empresas.Empresas();

                ViewBag.idEmpresa = id;

                var empPromoView = new ViewModel.Empresa.EmpresaPromocoes();
                empPromoView.Empresa = RNEmpresa.RetornaPerfilEmpresa(id);
                return(View(empPromoView));
            }
            else
            {
                return(RedirectToAction("Promo_semAcesso", "Empresa"));
            }
        }