Ejemplo n.º 1
0
        private object GetDataComments(int bookID)
        {
            List <Comment> commentList = CommentsDAO.GetComments(bookID);
            object         jsonData    = (from d in commentList
                                          select new {
                comment_id = d.CommentID,
                username = CommentsDAO.getUsername(d.UserID),
                picture = CommentsDAO.getPicture(d.UserID),
                content = d.Content,
                date = string.Format("{0} {1}", CommonConstant.GetWeekOfDate(d.CreatedDate, "dd/MM/yyyy"), d.CreatedDate.ToString("HH:mm")),
            }).ToList();

            return(jsonData);
        }