Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #4
0
        public ActionResult Message()
        {
            DataDetail data = new DataDetail();

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