public FormDashboard(string pname) { InitializeComponent(); this.CenterToParent(); int y = 0; foreach (Project p in FakeProjectRepository._Projects) { if (pname == p.Name) { id = p.Id; } } DateTime today = DateTime.Today; int year = today.Year; List <string> Months = newissue.GetIssuesByMonth(id); foreach (string x in Months) { y = 0; foreach (Issue t in FakeIssueRepository._Issues) { if (t.DiscoveryDate.Month.ToString() == x) { y++; } } listBox1.Items.Add(year + " - " + x + ": " + y); } List <string> Discovered = newissue.GetIssuesbyDiscoverer(id); foreach (string x in Discovered) { y = 0; foreach (Issue t in FakeIssueRepository._Issues) { if (t.Discoverer == x) { y++; } } foreach (AppUser user in FakeAppUserRepository._AppUsers.Values) { if (user.UserName == x) { listBox2.Items.Add(user.LastName + ", " + user.FirstName + ": " + y); } } } label4.Text = newissue.GetTotalNumberOfIssues(id).ToString(); }