示例#1
0
        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));
                }
            }
        }
示例#2
0
        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);
            }
        }
示例#3
0
        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);
            }
        }