private void Window_Loaded(object sender, RoutedEventArgs e) { WpfManageRockGroups.RockGroupsDataSet rockGroupsDataSet = ((WpfManageRockGroups.RockGroupsDataSet)(this.FindResource("rockGroupsDataSet"))); // Загрузить данные в таблицу Song. Можно изменить этот код как требуется. WpfManageRockGroups.RockGroupsDataSetTableAdapters.SongTableAdapter rockGroupsDataSetSongTableAdapter = new WpfManageRockGroups.RockGroupsDataSetTableAdapters.SongTableAdapter(); rockGroupsDataSetSongTableAdapter.Fill(rockGroupsDataSet.Song); System.Windows.Data.CollectionViewSource songViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("songViewSource"))); songViewSource.View.MoveCurrentToFirst(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { WinLogin l = new WinLogin(); l.ShowDialog(); WpfManageRockGroups.RockGroupsDataSet rockGroupsDataSet = ((WpfManageRockGroups.RockGroupsDataSet)(this.FindResource("rockGroupsDataSet"))); // Загрузить данные в таблицу Band. Можно изменить этот код как требуется. WpfManageRockGroups.RockGroupsDataSetTableAdapters.BandTableAdapter rockGroupsDataSetBandTableAdapter = new WpfManageRockGroups.RockGroupsDataSetTableAdapters.BandTableAdapter(); rockGroupsDataSetBandTableAdapter.Fill(rockGroupsDataSet.Band); System.Windows.Data.CollectionViewSource bandViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("bandViewSource"))); bandViewSource.View.MoveCurrentToFirst(); }