public void fillPKTableList(DropDownList ddPK, List <ListItem> listOfTables) { ddPK.Items.Clear(); DBQueDao dbQueDaoObj = new DBQueDao(); foreach (ListItem item in listOfTables) { if (item.Text != "" && dbQueDaoObj.getPKFKColumnList(item.Text, "BBB").Count > 0) { ddPK.Items.Add(new ListItem(item.Text, item.Value)); } } }
protected void getPKFKColumnListItemsByTableName(String tableName) { DBQueDao daoObj = new DBQueDao(); List <DBQuePKFKColumn> colList = daoObj.getPKFKColumnList(tableName, "A1"); foreach (DBQuePKFKColumn col in colList) { ListItem columnObj = new ListItem(); columnObj.Text = col.fkTableName; columnObj.Value = col.fkColumnName; DropDownList2.Items.Add(columnObj); } }
public void fillFKTableListForPKTable(String tableName, DropDownList ddListName, String alias) { DBQueDao daoObj = new DBQueDao(); List <DBQuePKFKColumn> colList = daoObj.getPKFKColumnList(tableName, alias); ddListName.Items.Clear(); foreach (DBQuePKFKColumn col in colList) { ListItem columnObj = new ListItem(); columnObj.Text = col.fkTableName; columnObj.Value = col.fkColumnName; ddListName.Items.Add(columnObj); } }