Beispiel #1
0
        public List <DTOTag> ConsultarTags()
        {
            BMTag         TagBM  = null;
            List <DTOTag> result = null;

            try
            {
                TagBM = new BMTag();
                IList <Tag> lstTag = new List <Tag>();
                lstTag = TagBM.ObterTodos();
                result = new List <DTOTag>();

                foreach (Tag nivel0 in lstTag.Where(x => x.NumeroNivel == 0))
                {
                    DTOTag dtoTag0 = new DTOTag()
                    {
                        Nome = nivel0.Nome, ID = nivel0.ID, ListaFilhos = RetornaFilhosTags(nivel0), Sinonimo = nivel0.InSinonimo.HasValue ? nivel0.InSinonimo.Value : false, NumeroNivel = nivel0.NumeroNivel
                    };
                    result.Add(dtoTag0);
                }
            }
            catch (Exception ex)
            {
                ErroUtil.Instancia.TratarErro(ex);
            }

            return(result);
        }
Beispiel #2
0
 /// <summary>
 /// Método Construtor da classe
 /// </summary>
 public ManterTag()
     : base()
 {
     bmTag = new BMTag();
 }