public Dictionary <string, SimpleTreeItem> LoadRubricaIndex(IndexedCatalogs catalog, int?levels) { Dictionary <string, SimpleTreeItem> list = new Dictionary <string, SimpleTreeItem>(); using (RubricaSQLDb dao = new RubricaSQLDb()) { 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); }
public Dictionary <string, SimpleTreeItem> LoadRubricaIndex(Int64 startNode, IndexedCatalogs catalog, int?levels) { Dictionary <string, SimpleTreeItem> list = new Dictionary <string, SimpleTreeItem>(); using (RubricaSQLDb dao = new RubricaSQLDb()) { 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); }