private int AddCategory(string[] strargs, int intargs) { divdevDataSetTableAdapters.CategoryTableAdapter auto = new divdevDataSetTableAdapters.CategoryTableAdapter(); auto.Insert(Int16.Parse(strargs[0]), strargs[1], strargs[2]); return(1); }
private void Window_Loaded(object sender, RoutedEventArgs e) { divdevDataSet dataset = new divdevDataSet(); // use a table adapter to populate the Supplier table divdevDataSetTableAdapters.CategoryTableAdapter adapter = new divdevDataSetTableAdapters.CategoryTableAdapter(); adapter.Fill(dataset.Category); // use the Customer table as the DataContext for this Window dataGrid.ItemsSource = dataset.Category.DefaultView; }