private void loadSchemas() { try { SchemaReader.SCHEMATADataTable tbl = new SchemaReader.SCHEMATADataTable(); CodeGenerator.BL.DBReader.DS.SchemaReaderTableAdapters.SCHEMATATableAdapter adp = new CodeGenerator.BL.DBReader.DS.SchemaReaderTableAdapters.SCHEMATATableAdapter(); adp.Connection = new System.Data.SqlClient.SqlConnection(comboBox1.Items[comboBox1.SelectedIndex].ToString()); adp.Fill(tbl); listBox1.DisplayMember = tbl.SCHEMA_NAMEColumn.ColumnName; listBox1.ValueMember = tbl.SCHEMA_NAMEColumn.ColumnName; listBox1.DataSource = tbl; }catch (Exception ex) { } }
public virtual SchemaReader.SCHEMATADataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; SchemaReader.SCHEMATADataTable dataTable = new SchemaReader.SCHEMATADataTable(); this.Adapter.Fill(dataTable); return dataTable; }