43 lines
1.4 KiB
C#
43 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Navigation;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace WpfApp1
|
|
{
|
|
/// <summary>
|
|
/// Логика взаимодействия для MainWindow.xaml
|
|
/// </summary>
|
|
public partial class MainWindow : Window
|
|
{
|
|
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void Window_Loaded(object sender, RoutedEventArgs e)
|
|
{
|
|
|
|
WpfApp1.DataSet1 dataSet1 = ((WpfApp1.DataSet1)(this.FindResource("dataSet1")));
|
|
// Загрузить данные в таблицу Client. Можно изменить этот код как требуется.
|
|
WpfApp1.DataSet1TableAdapters.ClientTableAdapter dataSet1ClientTableAdapter = new WpfApp1.DataSet1TableAdapters.ClientTableAdapter();
|
|
dataSet1ClientTableAdapter.Fill(dataSet1.Client);
|
|
System.Windows.Data.CollectionViewSource clientViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("clientViewSource")));
|
|
clientViewSource.View.MoveCurrentToFirst();
|
|
DataContext = this;
|
|
|
|
}
|
|
}
|
|
}
|