Example #1
0
        public ActionResult BlogManagement(long id)
        {
            BusinessManagement.Blog blog = new BusinessManagement.Blog(id);

            if (User.Identity.Name != blog.GetAuthor())
                RedirectToAction("Blog");

            ViewBag.Title = blog.GetName();
            ViewBag.Articles = blog.GetArticles();
            ViewBag.id = id;

            return View();
        }
Example #2
0
        public ActionResult BlogManagement(long id)
        {
            BusinessManagement.Blog blog = new BusinessManagement.Blog(id);

            if (User.Identity.Name != blog.GetAuthor())
            {
                RedirectToAction("Blog");
            }

            ViewBag.Title    = blog.GetName();
            ViewBag.Articles = blog.GetArticles();
            ViewBag.id       = id;


            return(View());
        }