/// <summary> /// Constructor for a Dialog to create a new Event /// </summary> public DialogParticipantsOnTeam(Event E) { InitializeComponent(); this.E = E; this.P = new ParticipantOnTeam(); ClearFields(); UnlockControls(); UpdateButtons(true); }
/// <summary> /// Constructor for a Dialog for an Existing Event /// </summary> /// <param name="E">Event</param> public DialogParticipantsOnTeam(Event E, ParticipantOnTeam P) { InitializeComponent(); this.E = E; this.P = P; this.toUpdate = false; // Show Event Details ShowEvent(); LockControls(); UpdateButtons(false); }
private void EditParticipantsOnTeam_Click(object sender, EventArgs e) { if (participantsOnTeamList.FocusedItem != null) { // Get primary keys ListViewItem firstSelectedItem = participantsOnTeamList.FocusedItem; int participantID = Convert.ToInt32(firstSelectedItem.SubItems[0].Text); string teamName = firstSelectedItem.SubItems[3].Text; ParticipantOnTeam P = DBLayer.ParticipantsOnTeam.Read(participantID, teamName); DialogParticipantsOnTeam dialog = new DialogParticipantsOnTeam(E, P); dialog.Show(); } }