Ejemplo n.º 1
0
 public Rubrica GetRubricaItem(long idRub)
 {
     using (IRubricaDao dao = this.getDaoContext().DaoImpl.RubricaDao)
     {
         return(dao.GetRubricaItem(idRub));
     }
 }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
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);
        }