示例#1
0
        private void envelopesCheckBox_Click(object sender, EventArgs e)
        {
            string       text;
            string       caption;
            DialogResult res;

            // If still using envelopes return
            if (envelopesCheckBox.Checked == true)
            {
                return;
            }

            int count = DBquery.getELineCount(currentID);

            if (count < 1)
            {
                return;
            }

            caption = "Delete Envelope Lines?";

            text  = "By removing the use of envelopes from this account \n";
            text += count.ToString() + " envelope lines will be deleted. \n\n";
            text += "Click YES if you want this to happen.";

            res = MessageBox.Show(text, caption, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button3);

            if (res != DialogResult.Yes)
            {
                this.envelopesCheckBox.Checked = true;
            }
        }