Esempio n. 1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            timerStart();
            WpfApp1.marathonDataSet marathonDataSet = ((WpfApp1.marathonDataSet)(FindResource("marathonDataSet")));
            // Загрузить данные в таблицу Runner. Можно изменить этот код как требуется.
            WpfApp1.marathonDataSetTableAdapters.RunnerTableAdapter marathonDataSetRunnerTableAdapter = new WpfApp1.marathonDataSetTableAdapters.RunnerTableAdapter();
            marathonDataSetRunnerTableAdapter.SerchEmail(marathonDataSet.Runner, Runner.Email);
            System.Windows.Data.CollectionViewSource runnerViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("runnerViewSource")));
            runnerViewSource.View.MoveCurrentToFirst();
            // Загрузить данные в таблицу User. Можно изменить этот код как требуется.
            WpfApp1.marathonDataSetTableAdapters.UserTableAdapter marathonDataSetUserTableAdapter = new WpfApp1.marathonDataSetTableAdapters.UserTableAdapter();
            marathonDataSetUserTableAdapter.SerchEmail(marathonDataSet.User, Runner.Email);
            System.Windows.Data.CollectionViewSource userViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("userViewSource")));
            userViewSource.View.MoveCurrentToFirst();
            // Загрузить данные в таблицу Country. Можно изменить этот код как требуется.
            WpfApp1.marathonDataSetTableAdapters.CountryTableAdapter marathonDataSetCountryTableAdapter = new WpfApp1.marathonDataSetTableAdapters.CountryTableAdapter();
            marathonDataSetCountryTableAdapter.SerchKod(marathonDataSet.Country, Runner.CountryCode);
            System.Windows.Data.CollectionViewSource countryViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("countryViewSource")));
            countryViewSource.View.MoveCurrentToFirst();
            var    bitmap = new BitmapImage();
            string sq     = AppDomain.CurrentDomain.BaseDirectory + photoTextBox.Text;

            bitmap.BeginInit();
            bitmap.UriSource = new Uri($"{sq}", UriKind.Absolute);
            bitmap.EndInit();
            bitmap.Freeze();
            PhotoUser.Source = bitmap;
            // Загрузить данные в таблицу Gender. Можно изменить этот код как требуется.
            WpfApp1.marathonDataSetTableAdapters.GenderTableAdapter marathonDataSetGenderTableAdapter = new WpfApp1.marathonDataSetTableAdapters.GenderTableAdapter();
            marathonDataSetGenderTableAdapter.Fill(marathonDataSet.Gender);
            System.Windows.Data.CollectionViewSource genderViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("genderViewSource")));
            genderViewSource.View.MoveCurrentToFirst();
        }
Esempio n. 2
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     timerStart();
     WpfApp1.marathonDataSet marathonDataSet = ((WpfApp1.marathonDataSet)(this.FindResource("marathonDataSet")));
     // Загрузить данные в таблицу Gender. Можно изменить этот код как требуется.
     WpfApp1.marathonDataSetTableAdapters.GenderTableAdapter marathonDataSetGenderTableAdapter = new WpfApp1.marathonDataSetTableAdapters.GenderTableAdapter();
     marathonDataSetGenderTableAdapter.Fill(marathonDataSet.Gender);
     System.Windows.Data.CollectionViewSource genderViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("genderViewSource")));
     genderViewSource.View.MoveCurrentToFirst();
     // Загрузить данные в таблицу Country. Можно изменить этот код как требуется.
     WpfApp1.marathonDataSetTableAdapters.CountryTableAdapter marathonDataSetCountryTableAdapter = new WpfApp1.marathonDataSetTableAdapters.CountryTableAdapter();
     marathonDataSetCountryTableAdapter.Fill(marathonDataSet.Country);
     System.Windows.Data.CollectionViewSource countryViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("countryViewSource")));
     countryViewSource.View.MoveCurrentToFirst();
 }