Exemplo n.º 1
0
        public ActionResult Update(string ArticleIDX, string No)
        {
            Articles   ar      = new Articles();
            ArticlesVO article = ar.Detail(No);

            ViewBag.ArticleIDX = ArticleIDX;//게시판 아이디
            ViewBag.Subject    = article.Title;
            ViewBag.Contents   = article.Contents;
            return(View());
        }
Exemplo n.º 2
0
        //게시판 글 단일 뷰
        public ActionResult Detail(string No, int pN, int start)
        {
            Articles          ar      = new Articles();
            ArticlesVO        article = ar.Detail(No);
            List <ArticlesVO> list    = ar.ArticleList(1);

            ViewBag.Max            = list.First().Total;
            ViewBag.Contents       = article.Contents;
            ViewBag.Subject        = article.Title;
            ViewBag.ViewCount      = article.ViewCount;
            ViewBag.RegistMemberID = article.RegistMemberID;
            ViewBag.RegistDate     = article.RegistDate;
            ViewBag.No             = article.No;
            ViewBag.ArticleIDX     = article.ArticleIDX;
            ViewBag.sessionID      = Session["ID"];

            //댓글

            ArticleComments          ac          = new ArticleComments();
            List <ArticleCommentsVO> CommentList = ac.CommentList(article.ArticleIDX, pN);

            if (CommentList.Count == 0)
            {
                ViewBag.Total = 0;
            }
            else
            {
                ViewBag.Total = CommentList.First().Total;
            }

            ViewBag.ArticleIDX = article.ArticleIDX;
            ViewBag.pN         = pN;
            ViewBag.start      = start;
            ViewBag.end        = start + 9;
            return(View(CommentList));
        }