コード例 #1
0
        private void BtNewAnswer_Click(object sender, RoutedEventArgs e)
        {
            string text = tbNewAnswer.Text;

            if (!String.IsNullOrEmpty(text))
            {
                db.AddAnswer(authorId, questionid, text);
                AnswersWindow win = (AnswersWindow)Window.GetWindow(this);
                win.fillAnswers();
            }
        }
コード例 #2
0
        private void BtNewComment_Click(object sender, RoutedEventArgs e)
        {
            string text = tbNewComment.Text;

            if (!String.IsNullOrEmpty(text))
            {
                db.AddComment(questionId, answerId, text, authorId);
                AnswersWindow win = (AnswersWindow)Window.GetWindow(this);
                win.fillQuestion();
                win.fillAnswers();
            }
        }