C# MessageBoxButtons.YesNo : I've got this problem, if I click the "No" button at MessageBoxButton.YesNo the data that is being typed is still inserting in the database. How should I fix this?

This is my codes:

    string insertQuery = "INSERT INTO db_personal(per_image,per_Fname,per_Mname,per_Lname)VALUES(@per_image,@per_Fname,@per_Mname,@per_Lname)";
    
    connection.Open();
    
                MySqlCommand cmd = new MySqlCommand(insertQuery, connection);
                cmd.Parameters.AddWithValue("@per_image", newPicture.Image);
                cmd.Parameters.AddWithValue("@per_Fname", newFirstName.Text);
                cmd.Parameters.AddWithValue("@per_Mname", newMiddleName.Text);
                cmd.Parameters.AddWithValue("@per_Lname", newLastName.Text);
                try
                {
                    if (cmd.ExecuteNonQuery() == 1)
                    {
                        MetroFramework.MetroMessageBox.Show(this, "New student information has been successfully saved.", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    else
                    {
                        MetroFramework.MetroMessageBox.Show(this, "Incomplete information. Are you sure you want to save?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                    }
    
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
                
                connection.Close();

Your help would highly be appreciated. Thank you.