private void Project_AddNew_Load(object sender, EventArgs e) { List <Personel> personels = DataBaseQueries.GetAllPersonel(); foreach (Personel personel in personels) { dataGridView_personel.Rows.Add(personel.personelid, personel.personelname); } }
private void FillButtons() { List <Project> projects = DataBaseQueries.GetProjects(); foreach (Project project in projects) { project.button = new Button(); project.button.Name = project.projectid.ToString(); AddButtonToForm(project.button, panel_projects, project.projectname); } List <Personel> personels = DataBaseQueries.GetAllPersonel(); foreach (Personel personel in personels) { AddButtonToForm(new Button(), panel_personel, personel.personelname); } }