コード例 #1
0
ファイル: Datamgmt.cs プロジェクト: frankkreutzer/IT-330
        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);
        }
コード例 #2
0
        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;
        }