Exemplo n.º 1
0
        public ActionResult BoardIndex(int BoardID)
        {
            Session["BoardID"] = BoardID;
            TribuneBoardVM tribuneBoard = new TribuneBoardVM();

            tribuneBoard.Posts            = PostM.GetSectionPost(BoardID);
            tribuneBoard.Sections         = PostM.GetSectionName(BoardID);
            tribuneBoard.PostsNumberAll   = PostM.GetPostNumberAll(BoardID);
            tribuneBoard.PostsNumberToday = PostM.GetPostNumberToday(BoardID);
            if (Session["UserID"] != null)
            {
                int userid = Convert.ToInt32(Session["UserID"]);
                tribuneBoard.Boardlevels = PostM.SelectUserLevel(userid);
            }
            return(View(tribuneBoard));
        }