private void FormRecordIssue_Load(object sender, EventArgs e) { this.CenterToParent(); int nextID; string disc; string IsStat; FakeIssueRepository IssueRepo = new FakeIssueRepository(); FakeAppUserRepository AppRepo = new FakeAppUserRepository(); FakeIssueStatusRepository IssueStatRepo = new FakeIssueStatusRepository(); List <AppUser> userList = new List <AppUser>(); List <IssueStatus> issueStatList = new List <IssueStatus>(); nextID = IssueRepo.GetNextIssueID(ID); textBoxIssueID.Text = nextID.ToString(); userList = AppRepo.GetAll(); foreach (AppUser user in userList) { disc = (user.LastName + ", " + user.FirstName); comboBoxDiscoverer.Items.Add(disc); } issueStatList = IssueStatRepo.GetAll(); foreach (IssueStatus stat in issueStatList) { IsStat = stat.Value; comboBoxIssueStatus.Items.Add(IsStat); } }
private void FormModifyIssue_Load(object sender, EventArgs e) { //FakeIssueStatusRepository myStatus = new FakeIssueStatusRepository(); P5.FakeAppUserRepository users = new P5.FakeAppUserRepository(); List <P5.AppUser> usrs = users.GetAll(); FakeIssueStatusRepository issues = new FakeIssueStatusRepository(); List <IssueStatus> myissues = new List <IssueStatus>(); myissues = issues.GetAll(); foreach (P5.AppUser usr in usrs) { string name = usr.LastName + ", " + usr.FirstName; this.disc.Items.Add(name); } foreach (IssueStatus isSt in myissues) { this.issStatus.Items.Add(isSt.Value); } this.issueID.Text = issToModify.id.ToString(); this.issueTitle.Text = issToModify.Title; this.discDate.Text = issToModify.DiscoveryDate.ToString(); this.disc.Text = issToModify.Discoverer; this.issComp.Text = issToModify.Component; this.issStatus.Text = issues.GetValueById(issToModify.IssueStatusid); this.initDesc.Text = issToModify.Component; }
private void RecordIssue_Load(object sender, EventArgs e) { this.CenterToParent(); textBox1.Text = issueRepository.GetNextID().ToString(); List <IssueStatus> issueStatuses = fakeIssueStatusRepository.GetAll(); foreach (IssueStatus issue in issueStatuses) { comboBoxStatus.Items.Add(issue.value); } comboBoxStatus.SelectedIndex = 0; FakeAppUserRepository fakeAppUserRepository = new FakeAppUserRepository(); List <AppUser> appUsers = fakeAppUserRepository.GetAll(); foreach (AppUser user in appUsers) { comboBoxDiscoverer.Items.Add(user.UserName); } }