Esempio n. 1
0
        public Dictionary <string, SimpleTreeItem> LoadRubricaIndex(Int64 startNode, IndexedCatalogs catalog, int?levels)
        {
            Dictionary <string, SimpleTreeItem> list = new Dictionary <string, SimpleTreeItem>();

            using (IRubricaDao dao = getDaoContext().DaoImpl.RubricaDao)
            {
                switch (catalog)
                {
                case IndexedCatalogs.ALL:
                    throw new Exception("il parametro ALL non è supportato,la ricerca potrebbe essere inconsistente");

                default:
                    list = dao.LoadTree(startNode, catalog, levels);
                    break;
                }
            }
            return(list);
        }
Esempio n. 2
0
        public Dictionary <string, SimpleTreeItem> LoadRubricaIndex(IndexedCatalogs catalog, int?levels)
        {
            Dictionary <string, SimpleTreeItem> list = new Dictionary <string, SimpleTreeItem>();

            using (IRubricaDao dao = getDaoContext().DaoImpl.RubricaDao)
            {
                switch (catalog)
                {
                case IndexedCatalogs.ALL:
                    list = list.Concat(dao.LoadTree(null, IndexedCatalogs.RUBR, levels)).ToDictionary(e => e.Key, e => e.Value);
                    // list = list.Concat(dao.LoadTree(null, IndexedCatalogs.IPA, levels)).ToDictionary(e => e.Key, e => e.Value);
                    break;

                default:
                    list = dao.LoadTree(null, catalog, levels);
                    break;
                }
            }
            return(list);
        }