Esempio n. 1
0
        public void fillComments()
        {
            stkComment.Children.Clear();
            List <Comment> comments = db.GetAnswerComments(answerId);

            foreach (Comment c in comments)
            {
                CommentControl commentForm = new CommentControl(c.Text, db.getAuthor(c.Author), c.Date);
                stkComment.Children.Add(commentForm);
            }
            stkComment.Children.Add(new NewCommentControl(-1, answerId, userId));
        }
Esempio n. 2
0
        public void fillQuestionComments()
        {
            stkComments.Children.Clear();
            List <Comment> comments = db.GetQuestionComments(questionId);

            foreach (Comment c in comments)
            {
                CommentControl commentForm = new CommentControl(c.Text, db.getAuthor(c.Author), c.Date);
                stkComments.Children.Add(commentForm);
            }
            stkComments.Children.Add(new NewCommentControl(questionId, -1, userId));
        }