Example #1
0
            private string GetTableName(BaseBookmark item, Pdw.Core.Relations relation)
            {
                // find biz name
                string bizName = item.BizName;

                // find table name
                string tableName = string.Empty;

                if (relation.MapInfos.ContainsKey(bizName))
                {
                    tableName = relation.MapInfos[bizName].TableName;
                }

                return(tableName);
            }
Example #2
0
            private List <string> FindTableNames(int index, IEnumerable <BaseBookmark> bookmarks, Pdw.Core.Relations relation)
            {
                int           boltForeach = 1;
                List <string> tableNames  = new List <string>();

                for (int i = index + 1; i < bookmarks.Count(); i++)
                {
                    BaseBookmark item = bookmarks.ElementAt(i);

                    // to setup commanding position on stop lookup children
                    if (boltForeach < 1)
                    {
                        break;
                    }

                    switch (item.Type)
                    {
                    case Core.BookmarkType.Select:
                    case Core.BookmarkType.StartIf:
                        if (boltForeach == 1)
                        {
                            tableNames.Add(GetTableName(item, relation));
                        }
                        break;

                    case BookmarkType.PdeTag:
                        if (boltForeach == 1)
                        {
                            tableNames.Add(item.Key);
                        }
                        _selectedTable = new List <List <string> >();
                        _selectedTable.Add(tableNames);
                        IsContainPdeTag = true;
                        break;

                    case Core.BookmarkType.StartForeach:
                        boltForeach++;
                        break;

                    case Core.BookmarkType.EndForeach:
                        boltForeach--;
                        break;

                    default:
                        break;
                    }
                }

                return(tableNames);
            }