/// <summary> /// Constructor for a Dialog to create a new Event /// </summary> public DialogStagesParticipations(Event E) { InitializeComponent(); this.E = E; this.S = new StageParticipation(); ClearFields(); UnlockControls(); UpdateButtons(true); }
/// <summary> /// Constructor for a Dialog for an Existing Event /// </summary> /// <param name="E">Event</param> public DialogStagesParticipations(Event E, StageParticipation S) { InitializeComponent(); this.E = E; this.S = S; this.toUpdate = false; // Show Event Details ShowStageParticipation(); LockControls(); UpdateButtons(false); }
private void EditStagesParticipations_Click(object sender, EventArgs e) { if (stagesParticipationsList.FocusedItem != null) { // Get primary keys ListViewItem firstSelectedItem = stagesParticipationsList.FocusedItem; int participantID = Convert.ToInt32(firstSelectedItem.SubItems[0].Text); DateTime stageDate = Convert.ToDateTime(firstSelectedItem.SubItems[3].Text); string stageStartLocation = firstSelectedItem.SubItems[4].Text; string stageEndLocation = firstSelectedItem.SubItems[5].Text; StageParticipation S = DBLayer.StagesParticipation.Read(participantID, E.Number, stageDate, stageStartLocation, stageEndLocation); DialogStagesParticipations dialog = new DialogStagesParticipations(E, S); dialog.Show(); } }