예제 #1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Localizador != null)
         {
             hashCode = hashCode * 59 + Localizador.GetHashCode();
         }
         if (Placa != null)
         {
             hashCode = hashCode * 59 + Placa.GetHashCode();
         }
         if (IdCliente != null)
         {
             hashCode = hashCode * 59 + IdCliente.GetHashCode();
         }
         if (Loja != null)
         {
             hashCode = hashCode * 59 + Loja.GetHashCode();
         }
         if (Status != null)
         {
             hashCode = hashCode * 59 + Status.GetHashCode();
         }
         if (IdPagamento != null)
         {
             hashCode = hashCode * 59 + IdPagamento.GetHashCode();
         }
         return(hashCode);
     }
 }
        /// <summary>
        /// Busca las etiquetas de un concepto
        /// </summary>
        /// <param name="xmlSchemaElement"></param>
        /// <param name="linkbase"></param>
        /// <returns></returns>
        private string etiquetas(Concept concepto, LinkbaseEtiqueta linkbase)
        {
            String etiquetasFinales = "";
            //Verificar todos los elementos desde donde aparezca el concepto
            ArcoEtiqueta arcoEtiqueta = null;

            foreach (Arco arcoGen in linkbase.Arcos)
            {
                arcoEtiqueta = (ArcoEtiqueta)arcoGen;
                Localizador loc = null;
                foreach (ElementoLocalizable elemento in arcoEtiqueta.ElementoDesde)
                {
                    loc = (Localizador)elemento;
                    if (loc.Destino.Elemento.Id.Equals(concepto.Elemento.Id))
                    {
                        //Concatenar las etiquetas disponibles

                        foreach (ElementoLocalizable elementoRecurso in arcoEtiqueta.ElementoHacia)
                        {
                            etiquetasFinales += ((Etiqueta)elementoRecurso.Destino).Lenguaje + " : " + ((Etiqueta)elementoRecurso.Destino).Rol + " : " + ((Etiqueta)elementoRecurso.Destino).Valor + " ";
                        }
                    }
                }
            }

            return(etiquetasFinales);
        }
예제 #3
0
        /// <summary>
        /// Returns true if Reserva instances are equal
        /// </summary>
        /// <param name="other">Instance of Reserva to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Reserva other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Localizador == other.Localizador ||
                     Localizador != null &&
                     Localizador.Equals(other.Localizador)
                     ) &&
                 (
                     Placa == other.Placa ||
                     Placa != null &&
                     Placa.Equals(other.Placa)
                 ) &&
                 (
                     IdCliente == other.IdCliente ||
                     IdCliente != null &&
                     IdCliente.Equals(other.IdCliente)
                 ) &&
                 (
                     Loja == other.Loja ||
                     Loja != null &&
                     Loja.Equals(other.Loja)
                 ) &&
                 (
                     Status == other.Status ||
                     Status != null &&
                     Status.Equals(other.Status)
                 ) &&
                 (
                     IdPagamento == other.IdPagamento ||
                     IdPagamento != null &&
                     IdPagamento.Equals(other.IdPagamento)
                 ));
        }
예제 #4
0
 public Empresa()
 {
     Endereco = Localizador.GetEndereco();
 }