コード例 #1
0
        private void addCommentBtn_Click(object sender, EventArgs e)
        {
            using (addCommentForm addComment = new addCommentForm())
            {
                DialogResult dr = addComment.ShowDialog();

                if (dr == DialogResult.Yes)
                {
                    MongoQueries.AddComment(addComment.NewComment);
                    MongoQueries.UpdateCommentAmount(addComment.MovieTitle, addComment.UserEmail);
                    MessageBox.Show("Comment added successfully.", "Add", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }