private void BtnToevoegen_Click(object sender, EventArgs e) { UserDialog dia = new UserDialog(true); dia.ShowDialog(); List <User> beheerUser = _gc.BeheerUser(); listBox1.DataSource = beheerUser; }
private void BtnWijzigen_Click(object sender, EventArgs e) { User updateUser = (User)listBox1.SelectedItem; UserDialog dia = new UserDialog(false, updateUser); dia.ShowDialog(); List <User> beheerUser = _gc.BeheerUser(); listBox1.DataSource = beheerUser; }