Пример #1
0
 protected bool Equals(RelacaoHierarquicaEntity entity)
 {
     if (entity == null)
     {
         return(false);
     }
     if (!base.Equals(entity))
     {
         return(false);
     }
     if (!Equals(_Id, entity._Id))
     {
         return(false);
     }
     return(true);
 }
Пример #2
0
        private void initTipoEntidadeProdutora(ISession session, RelacaoHierarquicaEntity rh)
        {
            if (rh.Upper != null)
            {
                NivelEntity nUpper = rh.Upper;
                if (nUpper != null)
                {
                    IQuery ncaq = session.CreateQuery("select c from NivelControloAutEntity as c where c.ID.Id = " + nUpper.Id + " AND c.IsDeleted = 0 ");
                    ncaq.SetTimeout(1000);
                    NivelControloAutEntity nca = ncaq.UniqueResult<NivelControloAutEntity>();
                    if (nca != null && !nca.IsDeleted)
                    {
                        this.idsControlosAutoridade += nca.ControloAut.Id.ToString() + " ";
                        ControloAutEntidadeProdutoraEntity caep = session.Get<ControloAutEntidadeProdutoraEntity>(nca.ControloAut.Id);
                        if (caep != null && !caep.IsDeleted)
                        {
                            TipoEntidadeProdutoraEntity tep = caep.TipoEntidadeProdutora;
                            if (tep != null && !tep.IsDeleted && tep.Designacao != null)
                            {
                                this.DesignacoesTipoEntidadeProdutora = tep.Designacao;
                            }
                        }
                        IQuery cadq = session.CreateQuery("select c from ControloAutDicionarioEntity as c where c.ControloAut.Id = " + nca.ControloAut.Id + " AND c.IsDeleted = 0 ");
                        cadq.SetTimeout(1000);
                        foreach (ControloAutDicionarioEntity cad in cadq.Enumerable())
                        {
                            if (cad != null && cad.Dicionario != null && !cad.Dicionario.IsDeleted && cad.Dicionario.Termo != null)
                            {
                                this.EntidadeProdutora += " " + cad.Dicionario.Termo;
                            }
                        }

                    }
                }
            }
        }
Пример #3
0
		protected bool Equals(RelacaoHierarquicaEntity entity)
		{
			if (entity == null) return false;
			if (!base.Equals(entity)) return false;
			if (!Equals(_Id, entity._Id)) return false;
			return true;
		}