Exemplo n.º 1
0
        public ActionResult Article(int ID)
        {
            DataDetail data = new DataDetail();

            data.ArticleList = DataList.GetArticleList(ID);
            data.Forum = DataList.GetDetail(ID).First();
            return View(data);
        }
Exemplo n.º 2
0
        public ActionResult AddArticle([Bind(Include = "TITLE,BODY,AUTHOR,FORUM_ID")]ARTICLE article)
        {
            if (ModelState.IsValid)
            {
                DataDetail data = new DataDetail();
                data.Article = DataList.AddArticle(article).First();

                var newID = data.Article.ID;
                return RedirectToAction("ArticleBody", "Home", new { ID = newID });
            }

            return View(article);
        }
Exemplo n.º 3
0
        public ActionResult ArticleBody(int ID)
        {
            DataDetail data = new DataDetail();

            data.Article = DataList.GetArticleDetail(ID).First();
            data.Forum = DataList.GetDetail(data.Article.FORUM_ID).First();
            data.ReplyList = DataList.GetReplyList(data.Article.ID);

            return View(data);
        }
Exemplo n.º 4
0
        public ActionResult Message()
        {
            DataDetail data = new DataDetail();

            data.ForumList = DataList.GetList();
            return View(data);
        }