Пример #1
0
        private void SaveCompetition(object sender, RoutedEventArgs e)
        {
            dynamic discId  = ((dynamic)this.Disciplines.SelectedItem).Id;
            dynamic placeId = ((dynamic)this.Disciplines.SelectedItem).Id;

            _competitionRepository.Update(Main.Competition, discId, placeId);

            Cancel(sender, e);

            Tournament_ListView.ItemsSource = _competitionRepository.GetCompetitions();

            Tournament_ListView.UpdateLayout();
        }
Пример #2
0
        public MainWindow()
        {
            InitializeComponent();

            _authRepository = new AuthRepository();

            _competitionRepository = new CompetitionsRepository();

            this.Tournament_ListView.ItemsSource = _competitionRepository.GetCompetitions();
            this.Disciplines.ItemsSource         = _competitionRepository.GetDisciplines();
            this.Places.ItemsSource = _competitionRepository.GetPlaces();
        }