Esempio n. 1
0
 /// <summary>
 /// Constructor for a Dialog to create a new Event
 /// </summary>
 public DialogSponsorshipTeam(Event E)
 {
     InitializeComponent();
     this.E = E;
     this.S = new SponsorshipTeam();
     ClearFields();
     UnlockControls();
     UpdateButtons(true);
 }
Esempio n. 2
0
        /// <summary>
        /// Constructor for a Dialog for an Existing Event
        /// </summary>
        /// <param name="E">Event</param>
        public DialogSponsorshipTeam(Event E, SponsorshipTeam S)
        {
            InitializeComponent();

            this.E        = E;
            this.S        = S;
            this.toUpdate = false;

            // Show Event Details
            ShowSponsorshipTeam();
            LockControls();
            UpdateButtons(false);
        }
Esempio n. 3
0
        private void EditSponsorshipTeams_Click(object sender, EventArgs e)
        {
            if (sponsorshipTeamsList.FocusedItem != null)
            {
                // Get primary keys
                ListViewItem firstSelectedItem = sponsorshipTeamsList.FocusedItem;

                int    sponsorID = Convert.ToInt32(firstSelectedItem.SubItems[0].Text);
                string teamName  = firstSelectedItem.SubItems[3].Text;

                SponsorshipTeam S = DBLayer.SponsorshipTeams.Read(sponsorID, teamName);

                DialogSponsorshipTeam dialog = new DialogSponsorshipTeam(E, S);
                dialog.Show();
            }
        }