Beispiel #1
0
        public ActionResult List(string type)
        {
            var objType = articleTypeRepositoryFE.GetItemByNameAscii(type);

            if (objType.IsSinglePage.HasValue && objType.IsSinglePage.Value)
            {
                var result = articleRepositoryFE.TopOneNewsByType(type);
                return View("~/Views/Article/TopOneNewsByType.cshtml", result);
            }
            var page = !string.IsNullOrEmpty(Request["page"]) ? Web365Utility.Web365Utility.ToInt32(Request["page"]) : 1;
            var list = articleRepositoryFE.GetListByType(0, type, (page - 1) * ConfigWeb.PageSizeNews, ConfigWeb.PageSizeNews);
            return Request.Browser.IsMobileDevice ? View(@"~/Views/Mobile/ListNews.cshtml", list) : View(list);
        }
Beispiel #2
0
        public ActionResult Contact()
        {
            var result = _articleRepositoryFe.TopOneNewsByType("lien-he");

            return(View(result));
        }