Exemple #1
0
        private void toolStripButtonDelete_Click(object sender, EventArgs e)
        {
            Issue        issue  = (Issue)bindingSourceIssues.Current;
            DialogResult result = MessageBox.Show("Are you sure you want to delete this issue?",
                                                  "Confirmation",
                                                  MessageBoxButtons.YesNo,
                                                  MessageBoxIcon.Question,
                                                  MessageBoxDefaultButton.Button2);

            if (result == DialogResult.Yes)
            {
                IssuesRepository issuesRepository = new IssuesRepository();
                issuesRepository.Delete(issue);
                BindControls();
            }
        }
Exemple #2
0
 public void Delete(int id)
 {
     _issuesRepository.Delete(id);
 }