コード例 #1
0
        /// <summary>
        /// Returns true if InventoryOrderAssetPutResource instances are equal
        /// </summary>
        /// <param name="other">Instance of InventoryOrderAssetPutResource to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(InventoryOrderAssetPutResource other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     AssetNumber == other.AssetNumber ||
                     AssetNumber != null &&
                     AssetNumber.Equals(other.AssetNumber)
                     ) &&
                 (
                     SubNumber == other.SubNumber ||
                     SubNumber != null &&
                     SubNumber.Equals(other.SubNumber)
                 ) &&
                 (
                     CompanyCode == other.CompanyCode ||
                     CompanyCode != null &&
                     CompanyCode.Equals(other.CompanyCode)
                 ) &&
                 (
                     Status == other.Status ||
                     Status != null &&
                     Status.Equals(other.Status)
                 ) &&
                 (
                     Checked == other.Checked ||
                     Checked != null &&
                     Checked.Equals(other.Checked)
                 ) &&
                 (
                     CommentCostCenter == other.CommentCostCenter ||
                     CommentCostCenter != null &&
                     CommentCostCenter.Equals(other.CommentCostCenter)
                 ) &&
                 (
                     CommentLocation == other.CommentLocation ||
                     CommentLocation != null &&
                     CommentLocation.Equals(other.CommentLocation)
                 ) &&
                 (
                     CommentOther == other.CommentOther ||
                     CommentOther != null &&
                     CommentOther.Equals(other.CommentOther)
                 ) &&
                 (
                     CommentPlant == other.CommentPlant ||
                     CommentPlant != null &&
                     CommentPlant.Equals(other.CommentPlant)
                 ));
        }
コード例 #2
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 (AssetNumber != null)
         {
             hashCode = hashCode * 59 + AssetNumber.GetHashCode();
         }
         if (SubNumber != null)
         {
             hashCode = hashCode * 59 + SubNumber.GetHashCode();
         }
         if (CompanyCode != null)
         {
             hashCode = hashCode * 59 + CompanyCode.GetHashCode();
         }
         if (Status != null)
         {
             hashCode = hashCode * 59 + Status.GetHashCode();
         }
         if (Checked != null)
         {
             hashCode = hashCode * 59 + Checked.GetHashCode();
         }
         if (CommentCostCenter != null)
         {
             hashCode = hashCode * 59 + CommentCostCenter.GetHashCode();
         }
         if (CommentLocation != null)
         {
             hashCode = hashCode * 59 + CommentLocation.GetHashCode();
         }
         if (CommentOther != null)
         {
             hashCode = hashCode * 59 + CommentOther.GetHashCode();
         }
         if (CommentPlant != null)
         {
             hashCode = hashCode * 59 + CommentPlant.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #3
0
        /// <summary>
        /// Returns true if InventoryOrderAsset instances are equal
        /// </summary>
        /// <param name="other">Instance of InventoryOrderAsset to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(InventoryOrderAsset other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     InventoryOrderId == other.InventoryOrderId ||
                     InventoryOrderId != null &&
                     InventoryOrderId.Equals(other.InventoryOrderId)
                     ) &&
                 (
                     Checked == other.Checked ||
                     Checked != null &&
                     Checked.Equals(other.Checked)
                 ) &&
                 (
                     LastModified == other.LastModified ||
                     LastModified != null &&
                     LastModified.Equals(other.LastModified)
                 ) &&
                 (
                     Created == other.Created ||
                     Created != null &&
                     Created.Equals(other.Created)
                 ) &&
                 (
                     ChangedBy == other.ChangedBy ||
                     ChangedBy != null &&
                     ChangedBy.Equals(other.ChangedBy)
                 ) &&
                 (
                     CommentOther == other.CommentOther ||
                     CommentOther != null &&
                     CommentOther.Equals(other.CommentOther)
                 ) &&
                 (
                     CommentCostCenter == other.CommentCostCenter ||
                     CommentCostCenter != null &&
                     CommentCostCenter.Equals(other.CommentCostCenter)
                 ) &&
                 (
                     CommentPlant == other.CommentPlant ||
                     CommentPlant != null &&
                     CommentPlant.Equals(other.CommentPlant)
                 ) &&
                 (
                     CommentLocation == other.CommentLocation ||
                     CommentLocation != null &&
                     CommentLocation.Equals(other.CommentLocation)
                 ) &&
                 (
                     Status == other.Status ||
                     Status != null &&
                     Status.Equals(other.Status)
                 ) &&
                 (
                     Asset == other.Asset ||
                     Asset != null &&
                     Asset.Equals(other.Asset)
                 ) &&
                 (
                     AssetNumber == other.AssetNumber ||
                     AssetNumber != null &&
                     AssetNumber.Equals(other.AssetNumber)
                 ) &&
                 (
                     SubNumber == other.SubNumber ||
                     SubNumber != null &&
                     SubNumber.Equals(other.SubNumber)
                 ) &&
                 (
                     CompanyCode == other.CompanyCode ||
                     CompanyCode != null &&
                     CompanyCode.Equals(other.CompanyCode)
                 ));
        }