Esempio n. 1
0
 static NWindData()
 {
     ds = new nwindDataSet();
     nwindDataSetTableAdapters.CategoriesTableAdapter categoriesAdapter =
         new nwindDataSetTableAdapters.CategoriesTableAdapter();
     nwindDataSetTableAdapters.ProductsTableAdapter productsAdapter =
         new nwindDataSetTableAdapters.ProductsTableAdapter();
     categoriesAdapter.Fill(ds.Categories);
     productsAdapter.Fill(ds.Products);
 }
        public Form1()
        {
            InitializeComponent();

            dataSet = new nwindDataSet();
            adapter = new nwindDataSetTableAdapters.CategoriesTableAdapter();
            adapter.Fill(dataSet.Categories);

            nwindDataSetTableAdapters.ProductsTableAdapter productsTableAdapter = new nwindDataSetTableAdapters.ProductsTableAdapter();
            productsTableAdapter.Fill(dataSet.Products);
        }