private void btnCreateTeam_Click(object sender, EventArgs e) { try { Team t = _userInteraction.CreateTeam(txtTeamName.Text, dtpStartDate.Value, dtpEndDate.Value); //update checkboxes and lists lbExistingTeams.Items.Add(t); cbTeam.Items.Add(t); cbTeamMany.Items.Add(t); comboCredentialsTeam.Items.Add(t); } catch (Exception ex) { MessageBox.Show("Der er sket en fejl:\n" + ex.Message, "Fejl", MessageBoxButtons.OK, MessageBoxIcon.Error); } }