private void issuesModifyToolStripMenuItem_Click(object sender, System.EventArgs e) { FormSelectIssue form = new FormSelectIssue(_CurrentAppUser, _id, faker); form.ShowDialog(); if (form.DialogResult == DialogResult.OK) { //isolate the selected issue SelectedIssue = faker.GetIssueById(form.chosenID); FormIssueModify modifiedForm = new FormIssueModify(faker, SelectedIssue.Id); modifiedForm.Show(); } }
private void FormModifyIssue_Load(object sender, EventArgs e) { dateTimediscovery.MaxDate = DateTime.Now; //populates the options for the drop downs foreach (AppUser appUser in userRepository.GetAll()) { comboBoxdiscoverer.Items.Add(appUser.LastName + ", " + appUser.FirstName); } foreach (IssueStatus issueStatus in issueStatusRepository.GetAll()) { comboBoxstatus.Items.Add(issueStatus.Value); } //set initial values from selected issue Issue issue = issueRepository.GetIssueById(_SelectedIssueId); textBoxid.Text = Convert.ToString(issue.Id); textBoxtitle.Text = Convert.ToString(issue.Title); dateTimediscovery.Value = issue.DiscoveryDate; dateTimediscovery.CustomFormat = "hh:mm:ss tt dd MMM yyyy"; comboBoxdiscoverer.SelectedItem = issue.Discoverer; textBoxcomponent.Text = issue.Component; comboBoxstatus.Text = issueStatusRepository.GetValueById(issue.IssueStatusId); textBoxdescription.Text = issue.InitialDescription; this.CenterToScreen(); }
private void removebutton_Click_1(object sender, EventArgs e) { DialogResult isSure = MessageBox.Show("Are you sure you want to remove this issue? ", "Attention", MessageBoxButtons.YesNo); if (isSure == DialogResult.Yes) { killme = newissue.GetIssueById(selectedId); bool result = newissue.Remove(killme); } this.Close(); }
public FormModifyIssue(int issid) { InitializeComponent(); modifyme = newissue.GetIssueById(issid); }