private void Window_Loaded(object sender, RoutedEventArgs e) { ShopApp.InventoryDataSet inventoryDataSet = ((ShopApp.InventoryDataSet)(this.FindResource("inventoryDataSet"))); // Load data into the table Reparts. You can modify this code as needed. ShopApp.InventoryDataSetTableAdapters.RepartsTableAdapter inventoryDataSetRepartsTableAdapter = new ShopApp.InventoryDataSetTableAdapters.RepartsTableAdapter(); inventoryDataSetRepartsTableAdapter.Fill(inventoryDataSet.Reparts); System.Windows.Data.CollectionViewSource repartsViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("repartsViewSource"))); repartsViewSource.View.MoveCurrentToFirst(); // Load data into the table Reparts. You can modify this code as needed. ShopApp.InventoryDataSetTableAdapters.RepartsTableAdapter inventoryDataSetRepartsTableAdapters = new ShopApp.InventoryDataSetTableAdapters.RepartsTableAdapter(); inventoryDataSetRepartsTableAdapter.Fill(inventoryDataSet.Reparts); System.Windows.Data.CollectionViewSource repartsViewSources = ((System.Windows.Data.CollectionViewSource)(this.FindResource("repartsViewSource1"))); repartsViewSource.View.MoveCurrentToFirst(); // Load data into the table Depots. You can modify this code as needed. ShopApp.InventoryDataSetTableAdapters.DepotsTableAdapter inventoryDataSetDepotsTableAdapter = new ShopApp.InventoryDataSetTableAdapters.DepotsTableAdapter(); inventoryDataSetDepotsTableAdapter.Fill(inventoryDataSet.Depots); System.Windows.Data.CollectionViewSource depotsViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("depotsViewSource"))); depotsViewSource.View.MoveCurrentToFirst(); // Load data into the table Depots. You can modify this code as needed. ShopApp.InventoryDataSetTableAdapters.DepotsTableAdapter inventoryDataSetDepotsTableAdapters = new ShopApp.InventoryDataSetTableAdapters.DepotsTableAdapter(); inventoryDataSetDepotsTableAdapter.Fill(inventoryDataSet.Depots); System.Windows.Data.CollectionViewSource depotsViewSources = ((System.Windows.Data.CollectionViewSource)(this.FindResource("depotsViewSource1"))); depotsViewSource.View.MoveCurrentToFirst(); // Load data into the table Products. You can modify this code as needed. ShopApp.InventoryDataSetTableAdapters.ProductsTableAdapter inventoryDataSetProductsTableAdapter = new ShopApp.InventoryDataSetTableAdapters.ProductsTableAdapter(); inventoryDataSetProductsTableAdapter.Fill(inventoryDataSet.Products); System.Windows.Data.CollectionViewSource productsViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("productsViewSource"))); productsViewSource.View.MoveCurrentToFirst(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { ShopApp.InventoryDataSet inventoryDataSet = ((ShopApp.InventoryDataSet)(this.FindResource("inventoryDataSet"))); // Load data into the table Groups. You can modify this code as needed. ShopApp.InventoryDataSetTableAdapters.GroupsTableAdapter inventoryDataSetGroupsTableAdapter = new ShopApp.InventoryDataSetTableAdapters.GroupsTableAdapter(); inventoryDataSetGroupsTableAdapter.Fill(inventoryDataSet.Groups); System.Windows.Data.CollectionViewSource groupsViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("groupsViewSource"))); groupsViewSource.View.MoveCurrentToFirst(); }
private void UserControl_Loaded(object sender, RoutedEventArgs e) { // Do not load your data at design time. if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this)) { ShopApp.InventoryDataSet inventoryDataSet = ((ShopApp.InventoryDataSet)(this.FindResource("inventoryDataSet"))); // Load data into the table Reparts. You can modify this code as needed. ShopApp.InventoryDataSetTableAdapters.RepartsTableAdapter inventoryDataSetRepartsTableAdapter = new ShopApp.InventoryDataSetTableAdapters.RepartsTableAdapter(); inventoryDataSetRepartsTableAdapter.Fill(inventoryDataSet.Reparts); System.Windows.Data.CollectionViewSource repartsViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("repartsViewSource"))); repartsViewSource.View.MoveCurrentToFirst(); LoadData(); } }
private void Window_Loaded(object sender, RoutedEventArgs e) { ShopApp.InventoryDataSet inventoryDataSet = ((ShopApp.InventoryDataSet)(this.FindResource("inventoryDataSet"))); // Load data into the table Products. You can modify this code as needed. ShopApp.InventoryDataSetTableAdapters.ProductsTableAdapter inventoryDataSetProductsTableAdapter = new ShopApp.InventoryDataSetTableAdapters.ProductsTableAdapter(); inventoryDataSetProductsTableAdapter.Fill(inventoryDataSet.Products); System.Windows.Data.CollectionViewSource productsViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("productsViewSource"))); productsViewSource.View.MoveCurrentToFirst(); ShopApp.InventoryDataSetTableAdapters.ProductsTableAdapter inventoryDataSetProductsTableAdapter1 = new ShopApp.InventoryDataSetTableAdapters.ProductsTableAdapter(); inventoryDataSetProductsTableAdapter.Fill(inventoryDataSet.Products); System.Windows.Data.CollectionViewSource productsViewSource1 = ((System.Windows.Data.CollectionViewSource)(this.FindResource("productsViewSource1"))); productsViewSource.View.MoveCurrentToFirst(); // Load data into the table Njesite. You can modify this code as needed. ShopApp.InventoryDataSetTableAdapters.NjesiteTableAdapter inventoryDataSetNjesiteTableAdapter = new ShopApp.InventoryDataSetTableAdapters.NjesiteTableAdapter(); inventoryDataSetNjesiteTableAdapter.Fill(inventoryDataSet.Njesite); System.Windows.Data.CollectionViewSource njesiteViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("njesiteViewSource"))); njesiteViewSource.View.MoveCurrentToFirst(); }