private void FormSelectProject_Load(object sender, EventArgs e) { CenterToScreen(); FakeProjectRepository fp = new FakeProjectRepository(); List <Project> list = fp.GetAll(); foreach (var Project in list) { string projectsListed = (Project.Id + " - " + Project.Name); listBox1.Items.Add(projectsListed); } }
private void RemoveProject_Load(object sender, EventArgs e) { CenterToScreen(); FakeProjectRepository projectRepository = new FakeProjectRepository(); List <Project> list = projectRepository.GetAll(); foreach (var Project in list) { if (projectToBeRemoved == Project.Id) { ProjectToBeRemovedLabel.Text = Project.Name; } } }