public CompetitionWindow(Competition _competition = null)
        {
            InitializeComponent();

            competition = _competition;

            if (competition != null)
            {
                update = true;
                loadCompetitionDetails(competition);
            }
            else
                update = false;

            context = new GAA_Templates_ModelContainer();
            competitionViewContext = new CompetitionView(context);

            bindCountiesToComboBox();
        }
 public Competition UpdateCompetition(Competition comp, string name, DateTime startDate, DateTime endDate, County county)
 {
     return competitionViewContext.UpdateCompetition(comp, name, startDate, endDate, county);
 }
 public Competition DeleteCompetition(Competition comp)
 {
     return competitionViewContext.DeleteCompetition(comp);
 }
 private void loadCompetitionDetails(Competition comp)
 {
     this.nameTextBox.Text = comp.Name;
     this.startDateTimePicker.Value = comp.StartDate;
     this.endDateTimePicker.Value = comp.EndDate;
     this.countyComboBox.SelectedItem = comp.County;
 }
 public Match UpdateMatch(DateTime matchDate, TimeSpan time, Venue venue, CompetitionMatchType matchType, Competition competition, Team homeTeam, Team awayTeam)
 {
     return matchViewContext.UpdateMatch(matchDate, time, venue, matchType, competition, homeTeam, awayTeam);
 }