private void AthleteName_Click(object sender, RoutedEventArgs e) { ACompetitor comp = (ACompetitor)((Button)sender).Tag; if (comp == null) { return; } Athlete ath = (Athlete)comp.checkParameter("Athlete"); EditAthleteWindow eaw = new EditAthleteWindow(); eaw.DataContext = new AthleteVM(ath); eaw.Show(); }
private void btnOpenCompetitor_Click(object sender, RoutedEventArgs e) { if (Competitor != null) { if (Competitor.checkParameter("Athlete") != null) { try { // disabled in V3-0 as unsure if it will be brought across. 2016-04-24 //new EditAthleteWindow((Athlete)Competitor.checkParameter("Athlete")).Show(); } catch (Exception ex) { MessageBox.Show("Could not edit this athlete" + Environment.NewLine + ex.Message); } } } }