public void LoadToSQLEditor(CheckedListBox chckList, DataTable schemaData, SchemaRestrictions restriction, String extractField, string tableType) { chckList.Items.Clear(); if (schemaData != null) { foreach (DataRow aRow in schemaData.Rows) { bool loadIt = true; switch (restriction) { case SchemaRestrictions.Tables: if (!aRow["TABLE_TYPE"].ToString().Equals(tableType)) { loadIt = false; } break; } if (loadIt) { chckList.Items.Add(aRow[extractField].ToString()); } } } else { MessageBox.Show("Restriction not valid"); } }
public static void LoadToSQLEditor(CheckedListBox chckList, SchemaRestrictions restriction, String tableName, String extractField, DataBaseObjectClass aDataObject) { DataTable dt = aDataObject.GetSchemaData(restriction, tableName); chckList.Items.Clear(); if (dt != null) { foreach (DataRow aRow in dt.Rows) { chckList.Items.Add(aRow[extractField].ToString()); } } else { MessageBox.Show("Restriction not valid"); } }
public static List <String> LoadToList(SchemaRestrictions restriction, String tableName, String extractField, DataBaseObjectClass aDataObject) { List <String> result = new List <string>(); DataTable dt = aDataObject.GetSchemaData(restriction, tableName); if (dt != null) { foreach (DataRow aRow in dt.Rows) { result.Add(aRow[extractField].ToString()); } } else { MessageBox.Show("Restriction not valid"); } return(result); }
public void LoadToSQLEditor(CheckedListBox chckList, SchemaRestrictions restriction, String tableName, String extractField, string tableType, DataBaseObjectClass aDataObject) { LoadToSQLEditor(chckList, LoadSchema(restriction, tableName, aDataObject), restriction, extractField, tableType); }
public DataTable LoadSchema(SchemaRestrictions restriction, String tableName, DataBaseObjectClass aDataObject) { return(aDataObject.GetSchemaData(restriction, tableName)); }