Esempio n. 1
0
        private IEnumerable <Noticia> GetValuesOfMyRegion(int microregiaoId, Noticia objNoticia)
        {
            var lastestNews = Noticia.GetLastestNews(Constants.TakeNoticias, 1, 1, microregiaoId, null);

            ViewBag.ActiveNav      = "Sua Região";
            ViewBag.LinkActiveNav  = $"/{objNoticia.EditorialUrl}/{objNoticia.CategoriaUrl}";
            ViewBag.NavigationType = "plantao";
            ViewBag.ThemeValue     = "noticias";

            return(lastestNews);
        }
Esempio n. 2
0
        private IEnumerable <Noticia> GetValuesOfParana(int microregiaoId, Noticia objNoticia)
        {
            var lastestNews = Noticia.GetLastestNews(Constants.TakeNoticias, 1, 1, null, null);

            ViewBag.ActiveNav      = "Paraná";
            ViewBag.LinkActiveNav  = $"/{objNoticia.EditorialUrl}/{"parana"}";
            ViewBag.NavigationType = "parana";
            ViewBag.ThemeValue     = "noticias";

            return(lastestNews);
        }
Esempio n. 3
0
        private IEnumerable <Noticia> GetValuesOfCategory(Noticia objNoticia)
        {
            var lastestNews = Noticia.GetLastestNews(Constants.TakeNoticias, objNoticia.EditorialId, objNoticia.CategoriaId, null, null);

            ViewBag.ActiveNav      = objNoticia.Categoria.Titulo;
            ViewBag.LinkActiveNav  = $"/{objNoticia.EditorialUrl}/{objNoticia.CategoriaUrl}";
            ViewBag.NavigationType = "categoria";
            ViewBag.ThemeValue     = objNoticia.Categoria.Theme.Value;

            ViewBag.ScopeId   = objNoticia.Categoria.Id;
            ViewBag.Editorial = objNoticia.Categoria.Editorial;

            return(lastestNews);
        }
Esempio n. 4
0
        public ActionResult Index()
        {
            //Get the model
            var objModel = GetHomeIndexModel(GetMyLocationId);

            //Set the Live
            ViewBag.IsLive = objModel.Highlights[0].IsLive.HasValue ? objModel.Highlights[0].IsLive.Value : false;

            //Recupera as 4 ultimas notícias que são exibidas na sidebar
            ViewBag.Lastest4News = Noticia.GetLastestNews(4).ToList();

            //Recuper as 5 ultimas notícias mais acessadas
            ViewBag.Popular5News = Noticia.GetMoreAccessedNews(null);

            return(View(objModel));
        }