コード例 #1
0
ファイル: ItemLookUp.cs プロジェクト: mletterle/presentations
 public ItemLookUp()
 {
     InitializeComponent();
     DatabaseTableAdapters.ProductTableAdapter pta = new AdventureWorks.POS.DatabaseTableAdapters.ProductTableAdapter();
     Database.ProductDataTable dt = new Database.ProductDataTable();
     pta.Fill(dt);
     this.productDataTableBindingSource.DataSource = dt;
 }
コード例 #2
0
ファイル: CheckOut.cs プロジェクト: mletterle/presentations
 public CheckOut()
 {
     InitializeComponent();
     dt = new Database.ProductDataTable();
     this.productRowBindingSource.DataSource = dt;
     Database.ContactDataTable customers = new Database.ContactDataTable();
     DatabaseTableAdapters.ContactTableAdapter cta = new AdventureWorks.POS.DatabaseTableAdapters.ContactTableAdapter();
     cta.Fill(customers);
     this.comboBox1.DataSource = customers;
     Database.SalesPersonDataTable salespeople = new Database.SalesPersonDataTable();
     DatabaseTableAdapters.SalesPersonTableAdapter sta = new AdventureWorks.POS.DatabaseTableAdapters.SalesPersonTableAdapter();
     sta.Fill(salespeople);
     this.comboBox2.DataSource = salespeople;
 }