Пример #1
0
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            if (Session[id] == null)
            {
                HttpContext.Session.Add(id, id);
                pcs.PageViewDetails(id);
            }
            ViewBag.PageViewCount = pcs.GetPageViewCountByResourceID(id);
            Tutorials tutorials = tutorialsCRUD.GetTutorialsById(id);

            return(View(tutorials.ToModel()));
        }
Пример #2
0
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            if (Session[id] == null)
            {
                HttpContext.Session.Add(id, id);
                pcs.PageViewDetails(id);
            }
            ViewBag.PageViewCount = pcs.GetPageViewCountByResourceID(id);

            Article      article = articleCRUD.GetArticleById(id);
            ArticleModel am      = article.ToModel();

            ViewBag.PreArticle  = articleCRUD.GetPreArticle(article).ToModel();
            ViewBag.NextArticle = articleCRUD.GetNextArticle(article).ToModel();
            return(View(am));
        }