private void AddParticipation(object obj) { sel_part = new ParticipationModel(); ParticipationWindow cw = new ParticipationWindow(sel_part); if (cw.ShowDialog() == true) { sel_part.Project_ID = Pr.ID; db.AddParticipation(sel_part); db.Save(); d1.Participations = db.GetAllParticipations(Pr.ID); } }