Ejemplo n.º 1
0
 /// <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);
 }
Ejemplo n.º 2
0
        /// <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);
        }
Ejemplo n.º 3
0
        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();
            }
        }