Beispiel #1
0
        private void btnAddSponsor_Click(object sender, RoutedEventArgs e)
        {
            var createSponsor = new FrmSponsor();

            createSponsor.ShowDialog();
            refreshAllSponsors();
            populateSponsors();
        }
Beispiel #2
0
 private void dgSponsors_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (dgSponsors.SelectedIndex != -1)
     {
         Sponsor selectedSponsor = new Sponsor();
         try
         {
             selectedSponsor = _sponsorManager.SelectSponsor(((Sponsor)dgSponsors.SelectedItem).SponsorID);
             var readUpdateSponsor = new FrmSponsor(selectedSponsor);
             readUpdateSponsor.ShowDialog();
             refreshAllSponsors();
             populateSponsors();
         }
         catch (Exception ex)
         {
             MessageBox.Show("Unable to find that Sponsor\n" + ex.Message);
         }
     }
 }