Exemplo n.º 1
0
        private void issuesRemoveToolStripMenuItem_Click(object sender, System.EventArgs e)
        {
            IssueSelect select = new IssueSelect(_CurrentAppUser, selected_id);

            select.ShowDialog();
            if (select.DialogResult == DialogResult.OK)
            {
                Issue        tmp          = fakeIssueRepository.GetIssueByID(select.selectedIssueID);
                string       del          = "Are you sure you want to delete " + tmp.Title;
                DialogResult dialogResult = MessageBox.Show(del, "Confirmation", MessageBoxButtons.YesNo);
                if (dialogResult == DialogResult.Yes)
                {
                    fakeIssueRepository.Remove(tmp);
                }
                else if (dialogResult == DialogResult.No)
                {
                    MessageBox.Show("Delete cancelled", "Attention");
                }
            }
            select.Dispose();
        }