Example #1
0
        private void cmdDelete_Click(object sender, EventArgs e)
        {
            bs.EndEdit();

            if (MessageBox.Show("Are you sure you want to delete this comment and all of its uses?", "Confirm Delete", MessageBoxButtons.YesNo) == DialogResult.No)
            {
                return;
            }

            if (DBAction.DeleteNote(CurrentNote.ID) == 1)
            {
                MessageBox.Show("Error deleting note.");
            }
            else
            {
                bs.RemoveCurrent();
            }
        }