예제 #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is OrderLineItemDiscount other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((CatalogObjectId == null && other.CatalogObjectId == null) || (CatalogObjectId?.Equals(other.CatalogObjectId) == true)) &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) &&
                   ((Type == null && other.Type == null) || (Type?.Equals(other.Type) == true)) &&
                   ((Percentage == null && other.Percentage == null) || (Percentage?.Equals(other.Percentage) == true)) &&
                   ((AmountMoney == null && other.AmountMoney == null) || (AmountMoney?.Equals(other.AmountMoney) == true)) &&
                   ((AppliedMoney == null && other.AppliedMoney == null) || (AppliedMoney?.Equals(other.AppliedMoney) == true)) &&
                   ((Metadata == null && other.Metadata == null) || (Metadata?.Equals(other.Metadata) == true)) &&
                   ((Scope == null && other.Scope == null) || (Scope?.Equals(other.Scope) == true)) &&
                   ((RewardIds == null && other.RewardIds == null) || (RewardIds?.Equals(other.RewardIds) == true)) &&
                   ((PricingRuleId == null && other.PricingRuleId == null) || (PricingRuleId?.Equals(other.PricingRuleId) == true)));
        }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is InvoicePaymentRequest other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((RequestMethod == null && other.RequestMethod == null) || (RequestMethod?.Equals(other.RequestMethod) == true)) &&
                   ((RequestType == null && other.RequestType == null) || (RequestType?.Equals(other.RequestType) == true)) &&
                   ((DueDate == null && other.DueDate == null) || (DueDate?.Equals(other.DueDate) == true)) &&
                   ((FixedAmountRequestedMoney == null && other.FixedAmountRequestedMoney == null) || (FixedAmountRequestedMoney?.Equals(other.FixedAmountRequestedMoney) == true)) &&
                   ((PercentageRequested == null && other.PercentageRequested == null) || (PercentageRequested?.Equals(other.PercentageRequested) == true)) &&
                   ((TippingEnabled == null && other.TippingEnabled == null) || (TippingEnabled?.Equals(other.TippingEnabled) == true)) &&
                   ((AutomaticPaymentSource == null && other.AutomaticPaymentSource == null) || (AutomaticPaymentSource?.Equals(other.AutomaticPaymentSource) == true)) &&
                   ((CardId == null && other.CardId == null) || (CardId?.Equals(other.CardId) == true)) &&
                   ((Reminders == null && other.Reminders == null) || (Reminders?.Equals(other.Reminders) == true)) &&
                   ((ComputedAmountMoney == null && other.ComputedAmountMoney == null) || (ComputedAmountMoney?.Equals(other.ComputedAmountMoney) == true)) &&
                   ((TotalCompletedAmountMoney == null && other.TotalCompletedAmountMoney == null) || (TotalCompletedAmountMoney?.Equals(other.TotalCompletedAmountMoney) == true)) &&
                   ((RoundingAdjustmentIncludedMoney == null && other.RoundingAdjustmentIncludedMoney == null) || (RoundingAdjustmentIncludedMoney?.Equals(other.RoundingAdjustmentIncludedMoney) == true)));
        }
예제 #3
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is OrderReturnLineItem other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((SourceLineItemUid == null && other.SourceLineItemUid == null) || (SourceLineItemUid?.Equals(other.SourceLineItemUid) == true)) &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) &&
                   ((Quantity == null && other.Quantity == null) || (Quantity?.Equals(other.Quantity) == true)) &&
                   ((QuantityUnit == null && other.QuantityUnit == null) || (QuantityUnit?.Equals(other.QuantityUnit) == true)) &&
                   ((Note == null && other.Note == null) || (Note?.Equals(other.Note) == true)) &&
                   ((CatalogObjectId == null && other.CatalogObjectId == null) || (CatalogObjectId?.Equals(other.CatalogObjectId) == true)) &&
                   ((VariationName == null && other.VariationName == null) || (VariationName?.Equals(other.VariationName) == true)) &&
                   ((ReturnModifiers == null && other.ReturnModifiers == null) || (ReturnModifiers?.Equals(other.ReturnModifiers) == true)) &&
                   ((AppliedTaxes == null && other.AppliedTaxes == null) || (AppliedTaxes?.Equals(other.AppliedTaxes) == true)) &&
                   ((AppliedDiscounts == null && other.AppliedDiscounts == null) || (AppliedDiscounts?.Equals(other.AppliedDiscounts) == true)) &&
                   ((BasePriceMoney == null && other.BasePriceMoney == null) || (BasePriceMoney?.Equals(other.BasePriceMoney) == true)) &&
                   ((VariationTotalPriceMoney == null && other.VariationTotalPriceMoney == null) || (VariationTotalPriceMoney?.Equals(other.VariationTotalPriceMoney) == true)) &&
                   ((GrossReturnMoney == null && other.GrossReturnMoney == null) || (GrossReturnMoney?.Equals(other.GrossReturnMoney) == true)) &&
                   ((TotalTaxMoney == null && other.TotalTaxMoney == null) || (TotalTaxMoney?.Equals(other.TotalTaxMoney) == true)) &&
                   ((TotalDiscountMoney == null && other.TotalDiscountMoney == null) || (TotalDiscountMoney?.Equals(other.TotalDiscountMoney) == true)) &&
                   ((TotalMoney == null && other.TotalMoney == null) || (TotalMoney?.Equals(other.TotalMoney) == true)));
        }
예제 #4
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is OrderReturnServiceCharge other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((SourceServiceChargeUid == null && other.SourceServiceChargeUid == null) || (SourceServiceChargeUid?.Equals(other.SourceServiceChargeUid) == true)) &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) &&
                   ((CatalogObjectId == null && other.CatalogObjectId == null) || (CatalogObjectId?.Equals(other.CatalogObjectId) == true)) &&
                   ((Percentage == null && other.Percentage == null) || (Percentage?.Equals(other.Percentage) == true)) &&
                   ((AmountMoney == null && other.AmountMoney == null) || (AmountMoney?.Equals(other.AmountMoney) == true)) &&
                   ((AppliedMoney == null && other.AppliedMoney == null) || (AppliedMoney?.Equals(other.AppliedMoney) == true)) &&
                   ((TotalMoney == null && other.TotalMoney == null) || (TotalMoney?.Equals(other.TotalMoney) == true)) &&
                   ((TotalTaxMoney == null && other.TotalTaxMoney == null) || (TotalTaxMoney?.Equals(other.TotalTaxMoney) == true)) &&
                   ((CalculationPhase == null && other.CalculationPhase == null) || (CalculationPhase?.Equals(other.CalculationPhase) == true)) &&
                   ((Taxable == null && other.Taxable == null) || (Taxable?.Equals(other.Taxable) == true)) &&
                   ((AppliedTaxes == null && other.AppliedTaxes == null) || (AppliedTaxes?.Equals(other.AppliedTaxes) == true)));
        }
        /// <summary>
        /// Returns true if ProfileTypeDTO instances are equal
        /// </summary>
        /// <param name="input">Instance of ProfileTypeDTO to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ProfileTypeDTO input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Uid == input.Uid ||
                     (Uid != null &&
                      Uid.Equals(input.Uid))
                     ) &&
                 (
                     Label == input.Label ||
                     (Label != null &&
                      Label.Equals(input.Label))
                 ) &&
                 (
                     Kind == input.Kind ||
                     (Kind != null &&
                      Kind.Equals(input.Kind))
                 ) &&
                 (
                     SupportedItemTypes == input.SupportedItemTypes ||
                     SupportedItemTypes != null &&
                     SupportedItemTypes.SequenceEqual(input.SupportedItemTypes)
                 ));
        }
        /// <summary>
        /// Returns true if ChannelDTO instances are equal
        /// </summary>
        /// <param name="input">Instance of ChannelDTO to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ChannelDTO input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Uid == input.Uid ||
                     (Uid != null &&
                      Uid.Equals(input.Uid))
                     ) &&
                 (
                     Id == input.Id ||
                     (Id != null &&
                      Id.Equals(input.Id))
                 ) &&
                 (
                     ChannelTypeUID == input.ChannelTypeUID ||
                     (ChannelTypeUID != null &&
                      ChannelTypeUID.Equals(input.ChannelTypeUID))
                 ) &&
                 (
                     ItemType == input.ItemType ||
                     (ItemType != null &&
                      ItemType.Equals(input.ItemType))
                 ) &&
                 (
                     Kind == input.Kind ||
                     (Kind != null &&
                      Kind.Equals(input.Kind))
                 ) &&
                 (
                     Label == input.Label ||
                     (Label != null &&
                      Label.Equals(input.Label))
                 ) &&
                 (
                     Description == input.Description ||
                     (Description != null &&
                      Description.Equals(input.Description))
                 ) &&
                 (
                     DefaultTags == input.DefaultTags ||
                     DefaultTags != null &&
                     DefaultTags.SequenceEqual(input.DefaultTags)
                 ) &&
                 (
                     Properties == input.Properties ||
                     Properties != null &&
                     Properties.SequenceEqual(input.Properties)
                 ) &&
                 (
                     Configuration == input.Configuration ||
                     Configuration != null &&
                     Configuration.SequenceEqual(input.Configuration)
                 ));
        }
예제 #7
0
 /// <summary>
 /// Verifica se os elementos são iguais
 /// </summary>
 /// <param name="obj">elemento</param>
 /// <returns>verdadeiro se os Uid forem iguais</returns>
 public override bool Equals(object obj)
 {
     if (obj is Element)
     {
         return(Uid.Equals(((Element)obj).Uid));
     }
     return(false);
 }
예제 #8
0
 public bool Equals(FirebaseKey other)
 {
     if (other == null)
     {
         return(false);
     }
     return(Uid.Equals(other.Uid) && Group.Equals(other.Group));
 }
예제 #9
0
 public override bool Equals(object obj)
 {
     if (obj is ResourceView)
     {
         return(Uid.Equals(((ResourceView)obj).Uid));
     }
     return(base.Equals(obj));
 }
예제 #10
0
        public override bool Equals(object obj)
        {
            KeePassUuid other = obj as KeePassUuid;

            if (other == null)
            {
                return(false);
            }

            return(Uid.Equals(other.Uid));
        }
예제 #11
0
 public bool Equals(FilterResult other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Id.Equals(other.Id) &&
            Uid.Equals(other.Uid) &&
            string.Equals(Name, other.Name) &&
            string.Equals(Description, other.Description) &&
            StartUtc.Equals(other.StartUtc) &&
            EndUtc.Equals(other.EndUtc) &&
            OnMachineDesignId == other.OnMachineDesignId &&
            OnMachineDesignName == other.OnMachineDesignName &&
            AssetIDs.ScrambledEquals(other.AssetIDs) &&
            VibeStateOn == other.VibeStateOn &&
            CompactorDataOnly.Equals(other.CompactorDataOnly) &&
            ElevationType == other.ElevationType &&
            PolygonLL.ScrambledEquals(other.PolygonLL) &&
            PolygonGrid.ScrambledEquals(other.PolygonGrid) &&
            ForwardDirection == other.ForwardDirection &&
            (AlignmentFile == null ? other.AlignmentFile == null : AlignmentFile.Equals(other.AlignmentFile)) &&
            StartStation.Equals(other.StartStation) &&
            EndStation.Equals(other.EndStation) &&
            LeftOffset.Equals(other.LeftOffset) &&
            RightOffset.Equals(other.RightOffset) &&
            LayerType.Equals(other.LayerType) &&
            (LayerDesignOrAlignmentFile == null
        ? other.LayerDesignOrAlignmentFile == null
        : LayerDesignOrAlignmentFile.Equals(other.LayerDesignOrAlignmentFile)) &&
            BenchElevation.Equals(other.BenchElevation) &&
            LayerNumber == other.LayerNumber &&
            LayerThickness.Equals(other.LayerThickness) &&
            ContributingMachines.ScrambledEquals(other.ContributingMachines) &&
            SurveyedSurfaceExclusionList.ScrambledEquals(other.SurveyedSurfaceExclusionList) &&
            ExcludedSurveyedSurfaceUids.ScrambledEquals(other.ExcludedSurveyedSurfaceUids) &&
            ReturnEarliest.Equals(other.ReturnEarliest) &&
            GpsAccuracy.Equals(other.GpsAccuracy) &&
            GpsAccuracyIsInclusive.Equals(other.GpsAccuracyIsInclusive) &&
            BladeOnGround.Equals(other.BladeOnGround) &&
            TrackMapping.Equals(other.TrackMapping) &&
            WheelTracking.Equals(other.WheelTracking) &&
            (DesignFile == null ? other.DesignFile == null : DesignFile.Equals(other.DesignFile)) &&
            AutomaticsType == other.AutomaticsType &&
            TemperatureRangeMin.Equals(other.TemperatureRangeMin) &&
            TemperatureRangeMax.Equals(other.TemperatureRangeMax) &&
            PassCountRangeMin.Equals(other.PassCountRangeMin) &&
            PassCountRangeMax.Equals(other.PassCountRangeMax));
 }
예제 #12
0
 public override bool Equals(object obj)
 {
     if (obj is RecurringComponent && obj != this)
     {
         var r = (RecurringComponent)obj;
         if (Uid != null)
         {
             return(Uid.Equals(r.Uid));
         }
         return(Uid == r.Uid);
     }
     return(base.Equals(obj));
 }
예제 #13
0
파일: Component.cs 프로젝트: joffarex/Nyx
        public bool Equals(Component other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Uid.Equals(other.Uid));
        }
예제 #14
0
파일: Entity.cs 프로젝트: joffarex/Nyx
        public bool Equals(Entity other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Uid.Equals(other.Uid) && Equals(Transform, other.Transform) && (Name == other.Name) &&
                   Equals(Components, other.Components));
        }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)));
        }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is OrderLineItemPricingBlocklistsBlockedDiscount other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((DiscountUid == null && other.DiscountUid == null) || (DiscountUid?.Equals(other.DiscountUid) == true)) &&
                   ((DiscountCatalogObjectId == null && other.DiscountCatalogObjectId == null) || (DiscountCatalogObjectId?.Equals(other.DiscountCatalogObjectId) == true)));
        }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is OrderLineItemAppliedTax other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((TaxUid == null && other.TaxUid == null) || (TaxUid?.Equals(other.TaxUid) == true)) &&
                   ((AppliedMoney == null && other.AppliedMoney == null) || (AppliedMoney?.Equals(other.AppliedMoney) == true)));
        }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is OrderRoundingAdjustment other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) &&
                   ((AmountMoney == null && other.AmountMoney == null) || (AmountMoney?.Equals(other.AmountMoney) == true)));
        }
예제 #19
0
        public async Task Save(string emailAddress, string mailboxName, string messageFolderName, bool moveAttachments)
        {
            StorageFolder folder = await IOUtil.GetCreateFolder(Path.Combine(emailAddress, mailboxName, messageFolderName), FolderType.Message);

            if (moveAttachments)
            {
                await SaveAttachments(folder);
            }
            messageFolderName = messageFolderName.Replace(MailClient.MessageFolderPrefix.ToString(), "");
            if (!Uid.Equals(messageFolderName))
            {
                Uid = messageFolderName;
            }
            MessagePath = Path.Combine(folder.Path, Filename);
            StorageFile file = await folder.CreateFileAsync(Filename, CreationCollisionOption.ReplaceExisting).AsTask().ConfigureAwait(false);

            await FileIO.WriteTextAsync(file, IOUtil.Serialise(this));
        }
예제 #20
0
 public override bool Equals(object obj)
 {
     return(obj is AttributeDefinition definition &&
            Uid.Equals(definition.Uid) &&
            Ifnr == definition.Ifnr &&
            Text == definition.Text &&
            MinValue == definition.MinValue &&
            MaxValue == definition.MaxValue &&
            Datatype == definition.Datatype &&
            Group == definition.Group &&
            Modify == definition.Modify &&
            Visible == definition.Visible &&
            FunctionPointer == definition.FunctionPointer &&
            PropertyBitMask == definition.PropertyBitMask &&
            ParentUserDirCode == definition.ParentUserDirCode &&
            EqualityComparer <ComboBoxInput> .Default.Equals(ComboBox, definition.ComboBox) &&
            TextBox == definition.TextBox);
 }
예제 #21
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is InvoicePaymentReminder other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((RelativeScheduledDays == null && other.RelativeScheduledDays == null) || (RelativeScheduledDays?.Equals(other.RelativeScheduledDays) == true)) &&
                   ((Message == null && other.Message == null) || (Message?.Equals(other.Message) == true)) &&
                   ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true)) &&
                   ((SentAt == null && other.SentAt == null) || (SentAt?.Equals(other.SentAt) == true)));
        }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is SubscriptionPhase other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((Cadence == null && other.Cadence == null) || (Cadence?.Equals(other.Cadence) == true)) &&
                   ((Periods == null && other.Periods == null) || (Periods?.Equals(other.Periods) == true)) &&
                   ((RecurringPriceMoney == null && other.RecurringPriceMoney == null) || (RecurringPriceMoney?.Equals(other.RecurringPriceMoney) == true)) &&
                   ((Ordinal == null && other.Ordinal == null) || (Ordinal?.Equals(other.Ordinal) == true)));
        }
예제 #23
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is OrderLineItemModifier other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((CatalogObjectId == null && other.CatalogObjectId == null) || (CatalogObjectId?.Equals(other.CatalogObjectId) == true)) &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) &&
                   ((BasePriceMoney == null && other.BasePriceMoney == null) || (BasePriceMoney?.Equals(other.BasePriceMoney) == true)) &&
                   ((TotalPriceMoney == null && other.TotalPriceMoney == null) || (TotalPriceMoney?.Equals(other.TotalPriceMoney) == true)));
        }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is OrderFulfillment other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((Type == null && other.Type == null) || (Type?.Equals(other.Type) == true)) &&
                   ((State == null && other.State == null) || (State?.Equals(other.State) == true)) &&
                   ((Metadata == null && other.Metadata == null) || (Metadata?.Equals(other.Metadata) == true)) &&
                   ((PickupDetails == null && other.PickupDetails == null) || (PickupDetails?.Equals(other.PickupDetails) == true)) &&
                   ((ShipmentDetails == null && other.ShipmentDetails == null) || (ShipmentDetails?.Equals(other.ShipmentDetails) == true)));
        }
예제 #25
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is OrderReturn other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((SourceOrderId == null && other.SourceOrderId == null) || (SourceOrderId?.Equals(other.SourceOrderId) == true)) &&
                   ((ReturnLineItems == null && other.ReturnLineItems == null) || (ReturnLineItems?.Equals(other.ReturnLineItems) == true)) &&
                   ((ReturnServiceCharges == null && other.ReturnServiceCharges == null) || (ReturnServiceCharges?.Equals(other.ReturnServiceCharges) == true)) &&
                   ((ReturnTaxes == null && other.ReturnTaxes == null) || (ReturnTaxes?.Equals(other.ReturnTaxes) == true)) &&
                   ((ReturnDiscounts == null && other.ReturnDiscounts == null) || (ReturnDiscounts?.Equals(other.ReturnDiscounts) == true)) &&
                   ((RoundingAdjustment == null && other.RoundingAdjustment == null) || (RoundingAdjustment?.Equals(other.RoundingAdjustment) == true)) &&
                   ((ReturnAmounts == null && other.ReturnAmounts == null) || (ReturnAmounts?.Equals(other.ReturnAmounts) == true)));
        }
예제 #26
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is OrderReturnTax other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((SourceTaxUid == null && other.SourceTaxUid == null) || (SourceTaxUid?.Equals(other.SourceTaxUid) == true)) &&
                   ((CatalogObjectId == null && other.CatalogObjectId == null) || (CatalogObjectId?.Equals(other.CatalogObjectId) == true)) &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) &&
                   ((Type == null && other.Type == null) || (Type?.Equals(other.Type) == true)) &&
                   ((Percentage == null && other.Percentage == null) || (Percentage?.Equals(other.Percentage) == true)) &&
                   ((AppliedMoney == null && other.AppliedMoney == null) || (AppliedMoney?.Equals(other.AppliedMoney) == true)) &&
                   ((Scope == null && other.Scope == null) || (Scope?.Equals(other.Scope) == true)));
        }
예제 #27
0
        /// <summary>
        /// Returns true if Event instances are equal
        /// </summary>
        /// <param name="other">Instance of Event to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Login other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Pwd == other.Pwd ||
                     Pwd != null &&
                     Pwd.Equals(other.Pwd)
                     ) &&
                 (
                     Uid == other.Uid ||
                     Uid != null &&
                     Uid.Equals(other.Uid)

                 ));
        }
        private void InitForm()
        {
            try
            {
                lblMemberName.Text = $"<b>{MemberName}</b> (<em>NO.{Mid}</em>)";

                if (OrderID > 0)
                {
                    var o = (OrdrTicket)Order.Select(OrderID);

                    // For Vincent Song to View the MatchTickets Confirmation Page
                    if (ConfigGlobal.IsPluginAdmin(Uid) || (Uid.Equals(33067) && (int)o.Status >= 3))
                    {
                        lblMemberName.Text = $"<b>{o.MemberName}</b> (<em>NO.{o.MemberID}</em>)";
                    }
                    else
                    {
                        if (o == null || !o.MemberID.Equals(Mid) || !o.IsActive)
                        {
                            throw new Exception("此订单无效或非当前用户订单");
                        }
                    }

                    #region Bind OrderView Status Workflow

                    if (ucPortalWorkflowInfo != null)
                    {
                        ucPortalWorkflowInfo.JSONOrderStatusList = $"[ {string.Join(",", o.StatusWorkflowInfo)} ]";
                        ucPortalWorkflowInfo.CurrOrderStatus     = o.Status;
                    }

                    #endregion

                    var m = _repo.Single <Member>(o.MemberID);

                    lblOrderMobile.Text = $"<em>{o.Mobile}</em>";

                    #region Set Member Nation & Region

                    if (!string.IsNullOrEmpty(m.Nation))
                    {
                        if (m.Nation.Equals("中国"))
                        {
                            lblMemberRegion.Text = "中国 ";

                            var region = m.Region.Split('|');

                            foreach (var t in region)
                            {
                                int regionId;

                                if (int.TryParse(t, out regionId))
                                {
                                    lblMemberRegion.Text += DictionaryItem.Cache.Load(regionId).Name + " ";
                                }
                            }
                        }
                        else
                        {
                            lblMemberRegion.Text = m.Nation;
                        }
                    }
                    else
                    {
                        lblMemberRegion.Text = "无";
                    }

                    #endregion

                    lblMemberIDCardNo.Text     = m.IDCardNo;
                    lblMemberPassportNo.Text   = m.PassportNo;
                    lblMemberPassportName.Text = m.PassportName;
                    lblMemberWeChat.Text       = $"<em>{m.WeChat}</em>";
                    lblMemberEmail.Text        = $"<em>{m.Email}</em>";

                    lblOrderID.Text          = $"<em>{o.ID}</em>";
                    lblOrderCreateTime.Text  = o.CreateTime.ToString("yyyy-MM-dd HH:mm");
                    lblOrderDescription.Text = o.Description;

                    if (!string.IsNullOrEmpty(o.Remark))
                    {
                        lblOrderRemark.Text   = o.Remark.Replace("\r\n", "<br />");
                        phOrderRemark.Visible = true;
                    }
                    else
                    {
                        phOrderRemark.Visible = false;
                    }

                    // Should be Calculator in this Page
                    double price;
                    string priceInfo;

                    var oiMatchTicket = o.OIMatchTicket;

                    // Get Order MatchTicket Info

                    bool isMemberCouldPurchase;

                    if (oiMatchTicket != null && oiMatchTicket.IsActive)
                    {
                        var mt = MatchTicket.Cache.Load(oiMatchTicket.MatchGuid);

                        if (mt == null)
                        {
                            throw new Exception("无相关比赛信息,请联系管理员");
                        }

                        var mp = MemberPeriod.GetCurrentMemberPeriodByMemberID(Mid);

                        isMemberCouldPurchase = mt.CheckMemberCanPurchase(mp);

                        var p = Product.Cache.Load(mt.ProductCode);

                        if (p == null)
                        {
                            throw new Exception("无相关商品信息,请联系管理员");
                        }

                        lblMatchTicketInfo.Text =
                            $"<em>【{mt.LeagueName}】{mt.TeamName}({Arsenal_Team.Cache.Load(mt.TeamGuid).TeamEnglishName})</em>";
                        lblMatchTicketPlayTime.Text =
                            $"<em>【伦敦】{mt.PlayTimeLocal.ToString("yyyy-MM-dd HH:mm")}</em>";

                        var strRank = mt.ProductInfo.Trim();
                        if (lblMatchTicketRank != null && !string.IsNullOrEmpty(strRank))
                        {
                            lblMatchTicketRank.Text = $"<em>{strRank.Substring(strRank.Length - 7, 7)}</em>";
                        }

                        if (mt.AllowMemberClass.HasValue && mt.AllowMemberClass.Value == 2)
                        {
                            lblMatchTicketAllowMemberClass.Text = "<em>只限高级会员 (Premier) </em>";
                        }
                        else if (mt.AllowMemberClass.HasValue && mt.AllowMemberClass == 1)
                        {
                            lblMatchTicketAllowMemberClass.Text = "<em>普通会员 (Core) 以上</em>";
                        }
                        else
                        {
                            lblMatchTicketAllowMemberClass.Text = "无";
                        }

                        ucPortalMatchInfo.MatchGuid = mt.ID;

                        lblOrderItem_TravelDate.Text = oiMatchTicket.TravelDate.ToString("yyyy年MM月dd日");


                        // Set Order Price

                        price     = oiMatchTicket.TotalPrice;
                        priceInfo = string.Format("<合计> {2}:{0} × {1}", oiMatchTicket.UnitPrice.ToString("f2"),
                                                  oiMatchTicket.Quantity,
                                                  Product.Cache.Load(oiMatchTicket.ProductGuid).DisplayName);

                        tbOrderPrice.Text  = price.ToString(CultureInfo.CurrentCulture);
                        lblOrderPrice.Text = $"{priceInfo} = <em>{price.ToString("f2")}</em>元";

                        if (o.Status.Equals(OrderStatusType.Draft))
                        {
                            btnSubmit.Visible = true;
                            btnModify.Visible = true;
                            btnCancel.Visible = true;

                            if (!isMemberCouldPurchase)
                            {
                                lblOrderRemark.Text =
                                    $@"<em style='line-height: 1.8'>由于球票供应有限,所有主场球票预订均只向(Core/Premier)会员开放。<br />
                                        <a href='ServerMembershipCheck.ashx?OrderID={OrderID}' target='_blank' style='background: #fff48d'>
                                        【点击这里】请在续费或升级会员资格后,才能提交订单。</a></em>";
                                phOrderRemark.Visible = true;

                                btnSubmit.Visible = false;
                            }
                        }
                        else if (o.Status.Equals(OrderStatusType.Submitted))
                        {
                            btnSubmit.Visible = false;
                            btnModify.Visible = false;
                            btnCancel.Visible = true;

                            ucPortalProductQrCode.QrCodeUrl      = p.QrCodeUrl;
                            ucPortalProductQrCode.QrCodeProvider = "淘宝";
                        }
                        else
                        {
                            btnSubmit.Visible = false;
                            btnModify.Visible = false;
                            btnCancel.Visible = false;
                        }
                    }
                    else
                    {
                        throw new Exception("此订单未填写订票信息");
                    }
                }
                else
                {
                    throw new Exception("此订单不存在");
                }
            }
            catch (Exception ex)
            {
                ClientScript.RegisterClientScriptBlock(typeof(string), "failed",
                                                       $"alert('{ex.Message}');window.location.href = 'iArsenalOrder.aspx'", true);
            }
        }