Ejemplo n.º 1
0
 private void onIsRecurringChange(CswNbtNodeProp NodeProp, bool Creating)
 {
     if (IsRecurring.wasAnySubFieldModified())
     {
         _toggleProps();
     }
 }
Ejemplo n.º 2
0
 protected override void afterPopulateProps()
 {
     IsFavorite.SetOnPropChange(onIsFavortiteChange);
     IsRecurring.SetOnPropChange(onIsRecurringChange);
     Name.SetOnPropChange(onNamePropChange);
     SubmittedDate.SetOnPropChange(onSubmittedDatePropChange);
 } //afterPopulateProps()
Ejemplo n.º 3
0
        /// <summary>
        /// Returns true if RedirectPaymentMethodSpecificInput instances are equal
        /// </summary>
        /// <param name="other">Instance of RedirectPaymentMethodSpecificInput to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(RedirectPaymentMethodSpecificInput other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     IsRecurring == other.IsRecurring ||
                     IsRecurring != null &&
                     IsRecurring.Equals(other.IsRecurring)
                     ) &&
                 (
                     PaymentProduct840SpecificInput == other.PaymentProduct840SpecificInput ||
                     PaymentProduct840SpecificInput != null &&
                     PaymentProduct840SpecificInput.Equals(other.PaymentProduct840SpecificInput)
                 ) &&
                 (
                     ReturnUrl == other.ReturnUrl ||
                     ReturnUrl != null &&
                     ReturnUrl.Equals(other.ReturnUrl)
                 ));
        }
Ejemplo n.º 4
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 (Card != null)
         {
             hashCode = hashCode * 59 + Card.GetHashCode();
         }
         if (ExternalCardholderAuthenticationData != null)
         {
             hashCode = hashCode * 59 + ExternalCardholderAuthenticationData.GetHashCode();
         }
         if (IsRecurring != null)
         {
             hashCode = hashCode * 59 + IsRecurring.GetHashCode();
         }
         if (ReturnUrl != null)
         {
             hashCode = hashCode * 59 + ReturnUrl.GetHashCode();
         }
         return(hashCode);
     }
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Returns true if CardPaymentMethodSpecificInput instances are equal
        /// </summary>
        /// <param name="other">Instance of CardPaymentMethodSpecificInput to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CardPaymentMethodSpecificInput other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Card == other.Card ||
                     Card != null &&
                     Card.Equals(other.Card)
                     ) &&
                 (
                     ExternalCardholderAuthenticationData == other.ExternalCardholderAuthenticationData ||
                     ExternalCardholderAuthenticationData != null &&
                     ExternalCardholderAuthenticationData.Equals(other.ExternalCardholderAuthenticationData)
                 ) &&
                 (
                     IsRecurring == other.IsRecurring ||
                     IsRecurring != null &&
                     IsRecurring.Equals(other.IsRecurring)
                 ) &&
                 (
                     ReturnUrl == other.ReturnUrl ||
                     ReturnUrl != null &&
                     ReturnUrl.Equals(other.ReturnUrl)
                 ));
        }
        }                                                                                         //&& _CswNbtResources.Modules.IsModuleEnabled( CswNbtModuleName.MLM ); } }
        private void onIsRecurringChange(CswNbtNodeProp NodeProp)
        {
            if (IsRecurring.WasModified)
            {
                //Both Recurring and Favorites will be 'copied' at some frequency back to genuine Pending Request Items
                //Support both directions

                _toggleRequestItemPropVisibility();
                if (_IsRecurring)
                {
                    //Case 29393: Use a better status than ""
                    Status.Value = NonRequestableStatus;
                    RecurringFrequency.setHidden(value: false, SaveToDb: true);
                    NextReorderDate.setHidden(value: false, SaveToDb: true);
                    Name.setHidden(value: true, SaveToDb: true);
                }
                else if (false == _IsFavorite)
                {
                    if (string.IsNullOrEmpty(Status.Value) || Status.Value == NonRequestableStatus)
                    {
                        Status.Value = Statuses.Pending;
                    }
                    IsRecurring.setHidden(value: true, SaveToDb: true);
                    RecurringFrequency.setHidden(value: true, SaveToDb: true);
                    NextReorderDate.setHidden(value: true, SaveToDb: true);
                }
            }
        }
Ejemplo n.º 7
0
 public int GetEventRecurringValue(IsRecurring isRecurring)
 {
     if (isRecurring == IsRecurring.Yes)
     {
         return(1);
     }
     return(0);
 }
Ejemplo n.º 8
0
        /// <summary>
        /// Returns true if HostedCheckoutSpecificInput instances are equal
        /// </summary>
        /// <param name="other">Instance of HostedCheckoutSpecificInput to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(HostedCheckoutSpecificInput other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     IsRecurring == other.IsRecurring ||
                     IsRecurring != null &&
                     IsRecurring.Equals(other.IsRecurring)
                     ) &&
                 (
                     Locale == other.Locale ||
                     Locale != null &&
                     Locale.Equals(other.Locale)
                 ) &&
                 (
                     PaymentProductFilters == other.PaymentProductFilters ||
                     PaymentProductFilters != null &&
                     PaymentProductFilters.Equals(other.PaymentProductFilters)
                 ) &&
                 (
                     ReturnCancelState == other.ReturnCancelState ||
                     ReturnCancelState != null &&
                     ReturnCancelState.Equals(other.ReturnCancelState)
                 ) &&
                 (
                     ReturnUrl == other.ReturnUrl ||
                     ReturnUrl != null &&
                     ReturnUrl.Equals(other.ReturnUrl)
                 ) &&
                 (
                     ShowResultPage == other.ShowResultPage ||
                     ShowResultPage != null &&
                     ShowResultPage.Equals(other.ShowResultPage)
                 ) &&
                 (
                     Tokens == other.Tokens ||
                     Tokens != null &&
                     Tokens.Equals(other.Tokens)
                 ) &&
                 (
                     ValidateShoppingCart == other.ValidateShoppingCart ||
                     ValidateShoppingCart != null &&
                     ValidateShoppingCart.Equals(other.ValidateShoppingCart)
                 ) &&
                 (
                     Variant == other.Variant ||
                     Variant != null &&
                     Variant.Equals(other.Variant)
                 ));
        }
 /// <summary>
 ///
 /// </summary>
 public override void afterPropertySetPopulateProps()
 {
     Quantity.SetOnPropChange(onQuantityPropChange);
     TotalDispensed.SetOnPropChange(onTotalDispensedPropChange);
     Material.SetOnPropChange(onMaterialPropChange);
     TotalMoved.SetOnPropChange(onTotalMovedPropChange);
     IsFavorite.SetOnPropChange(onIsFavoritePropChange);
     IsRecurring.SetOnPropChange(onIsRecurringChange);
     RecurringFrequency.SetOnPropChange(onRecurringFrequencyPropChange);
 }//afterPopulateProps()
        /// <summary>
        /// Returns true if MandateSepaDirectDebit instances are equal
        /// </summary>
        /// <param name="other">Instance of MandateSepaDirectDebit to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(MandateSepaDirectDebit other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Creditor == other.Creditor ||
                     Creditor != null &&
                     Creditor.Equals(other.Creditor)
                     ) &&
                 (
                     MandateId == other.MandateId ||
                     MandateId != null &&
                     MandateId.Equals(other.MandateId)
                 ) &&
                 (
                     BankAccountIban == other.BankAccountIban ||
                     BankAccountIban != null &&
                     BankAccountIban.Equals(other.BankAccountIban)
                 ) &&
                 (
                     CustomerContractIdentifier == other.CustomerContractIdentifier ||
                     CustomerContractIdentifier != null &&
                     CustomerContractIdentifier.Equals(other.CustomerContractIdentifier)
                 ) &&
                 (
                     Debtor == other.Debtor ||
                     Debtor != null &&
                     Debtor.Equals(other.Debtor)
                 ) &&
                 (
                     IsRecurring == other.IsRecurring ||
                     IsRecurring != null &&
                     IsRecurring.Equals(other.IsRecurring)
                 ) &&
                 (
                     MandateApproval == other.MandateApproval ||
                     MandateApproval != null &&
                     MandateApproval.Equals(other.MandateApproval)
                 ) &&
                 (
                     PreNotification == other.PreNotification ||
                     PreNotification != null &&
                     PreNotification.Equals(other.PreNotification)
                 ));
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Returns true if NonSepaDirectDebitPaymentMethodSpecificInput instances are equal
        /// </summary>
        /// <param name="other">Instance of NonSepaDirectDebitPaymentMethodSpecificInput to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(NonSepaDirectDebitPaymentMethodSpecificInput other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     DateCollect == other.DateCollect ||
                     DateCollect != null &&
                     DateCollect.Equals(other.DateCollect)
                     ) &&
                 (
                     DirectDebitText == other.DirectDebitText ||
                     DirectDebitText != null &&
                     DirectDebitText.Equals(other.DirectDebitText)
                 ) &&
                 (
                     IsRecurring == other.IsRecurring ||
                     IsRecurring != null &&
                     IsRecurring.Equals(other.IsRecurring)
                 ) &&
                 (
                     PaymentProduct705SpecificInput == other.PaymentProduct705SpecificInput ||
                     PaymentProduct705SpecificInput != null &&
                     PaymentProduct705SpecificInput.Equals(other.PaymentProduct705SpecificInput)
                 ) &&
                 (
                     PaymentProduct730SpecificInput == other.PaymentProduct730SpecificInput ||
                     PaymentProduct730SpecificInput != null &&
                     PaymentProduct730SpecificInput.Equals(other.PaymentProduct730SpecificInput)
                 ) &&
                 (
                     RecurringPaymentSequenceIndicator == other.RecurringPaymentSequenceIndicator ||
                     RecurringPaymentSequenceIndicator != null &&
                     RecurringPaymentSequenceIndicator.Equals(other.RecurringPaymentSequenceIndicator)
                 ) &&
                 (
                     Token == other.Token ||
                     Token != null &&
                     Token.Equals(other.Token)
                 ) &&
                 (
                     Tokenize == other.Tokenize ||
                     Tokenize != null &&
                     Tokenize.Equals(other.Tokenize)
                 ));
        }
Ejemplo n.º 12
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 (IsRecurring != null)
         {
             hashCode = hashCode * 59 + IsRecurring.GetHashCode();
         }
         if (Locale != null)
         {
             hashCode = hashCode * 59 + Locale.GetHashCode();
         }
         if (PaymentProductFilters != null)
         {
             hashCode = hashCode * 59 + PaymentProductFilters.GetHashCode();
         }
         if (ReturnCancelState != null)
         {
             hashCode = hashCode * 59 + ReturnCancelState.GetHashCode();
         }
         if (ReturnUrl != null)
         {
             hashCode = hashCode * 59 + ReturnUrl.GetHashCode();
         }
         if (ShowResultPage != null)
         {
             hashCode = hashCode * 59 + ShowResultPage.GetHashCode();
         }
         if (Tokens != null)
         {
             hashCode = hashCode * 59 + Tokens.GetHashCode();
         }
         if (ValidateShoppingCart != null)
         {
             hashCode = hashCode * 59 + ValidateShoppingCart.GetHashCode();
         }
         if (Variant != null)
         {
             hashCode = hashCode * 59 + Variant.GetHashCode();
         }
         return(hashCode);
     }
 }
Ejemplo n.º 13
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 (DateCollect != null)
         {
             hashCode = hashCode * 59 + DateCollect.GetHashCode();
         }
         if (DirectDebitText != null)
         {
             hashCode = hashCode * 59 + DirectDebitText.GetHashCode();
         }
         if (IsRecurring != null)
         {
             hashCode = hashCode * 59 + IsRecurring.GetHashCode();
         }
         if (PaymentProduct705SpecificInput != null)
         {
             hashCode = hashCode * 59 + PaymentProduct705SpecificInput.GetHashCode();
         }
         if (PaymentProduct730SpecificInput != null)
         {
             hashCode = hashCode * 59 + PaymentProduct730SpecificInput.GetHashCode();
         }
         if (RecurringPaymentSequenceIndicator != null)
         {
             hashCode = hashCode * 59 + RecurringPaymentSequenceIndicator.GetHashCode();
         }
         if (Token != null)
         {
             hashCode = hashCode * 59 + Token.GetHashCode();
         }
         if (Tokenize != null)
         {
             hashCode = hashCode * 59 + Tokenize.GetHashCode();
         }
         return(hashCode);
     }
 }
 /// <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 (Creditor != null)
         {
             hashCode = hashCode * 59 + Creditor.GetHashCode();
         }
         if (MandateId != null)
         {
             hashCode = hashCode * 59 + MandateId.GetHashCode();
         }
         if (BankAccountIban != null)
         {
             hashCode = hashCode * 59 + BankAccountIban.GetHashCode();
         }
         if (CustomerContractIdentifier != null)
         {
             hashCode = hashCode * 59 + CustomerContractIdentifier.GetHashCode();
         }
         if (Debtor != null)
         {
             hashCode = hashCode * 59 + Debtor.GetHashCode();
         }
         if (IsRecurring != null)
         {
             hashCode = hashCode * 59 + IsRecurring.GetHashCode();
         }
         if (MandateApproval != null)
         {
             hashCode = hashCode * 59 + MandateApproval.GetHashCode();
         }
         if (PreNotification != null)
         {
             hashCode = hashCode * 59 + PreNotification.GetHashCode();
         }
         return(hashCode);
     }
 }
Ejemplo n.º 15
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 (IsRecurring != null)
         {
             hashCode = hashCode * 59 + IsRecurring.GetHashCode();
         }
         if (PaymentProduct840SpecificInput != null)
         {
             hashCode = hashCode * 59 + PaymentProduct840SpecificInput.GetHashCode();
         }
         if (ReturnUrl != null)
         {
             hashCode = hashCode * 59 + ReturnUrl.GetHashCode();
         }
         return(hashCode);
     }
 }
        public override IEnumerable <RequestParam> ToRequestParameters()
        {
            IList <RequestParam> result = new List <RequestParam>();

            if (CountryCode != null)
            {
                result.Add(new RequestParam("countryCode", CountryCode));
            }
            if (CurrencyCode != null)
            {
                result.Add(new RequestParam("currencyCode", CurrencyCode));
            }
            if (Locale != null)
            {
                result.Add(new RequestParam("locale", Locale));
            }
            if (Amount != null)
            {
                result.Add(new RequestParam("amount", Amount.ToString()));
            }
            if (IsRecurring != null)
            {
                result.Add(new RequestParam("isRecurring", IsRecurring.ToString().ToLower()));
            }
            if (Hide != null)
            {
                foreach (var hideElement in Hide)
                {
                    if (hideElement != null)
                    {
                        result.Add(new RequestParam("hide", hideElement));
                    }
                }
            }
            if (ForceBasicFlow != null)
            {
                result.Add(new RequestParam("forceBasicFlow", ForceBasicFlow.ToString().ToLower()));
            }
            return(result);
        }
        /// <summary>
        ///
        /// </summary>
        public override void onStatusPropChange(CswNbtNodeProp Prop)
        {
            if (Status.WasModified && Status.Value != NonRequestableStatus)
            {
                if (Status.Value == Statuses.Pending)
                {
                    TotalDispensed.setHidden(value: true, SaveToDb: true);
                    TotalMoved.setHidden(value: true, SaveToDb: true);
                    Type.setHidden(value: true, SaveToDb: true);
                    Quantity.setReadOnly(value: false, SaveToDb: true);
                    Size.setReadOnly(value: false, SaveToDb: true);
                    Count.setReadOnly(value: false, SaveToDb: true);

                    //MLM
                    if (_CswNbtResources.Modules.IsModuleEnabled(CswEnumNbtModuleName.MLM))
                    {
                        foreach (string PropName in PropertyName.MLMCmgTabProps)
                        {
                            _CswNbtNode.Properties[PropName].setHidden(value: true, SaveToDb: true);
                        }
                        foreach (string PropName in PropertyName.MLMReceiveTabProps)
                        {
                            _CswNbtNode.Properties[PropName].setHidden(value: true, SaveToDb: true);
                        }
                    }
                }
                else
                {
                    if (Type.Value == Types.Size)
                    {
                        TotalDispensed.setHidden(value: true, SaveToDb: true);
                        TotalMoved.setHidden(value: false, SaveToDb: true);
                    }
                    else
                    {
                        TotalDispensed.setHidden(value: false, SaveToDb: true);
                        TotalMoved.setHidden(value: true, SaveToDb: true);
                    }
                    Type.setHidden(value: false, SaveToDb: true);
                    Quantity.setReadOnly(value: true, SaveToDb: true);
                    Size.setReadOnly(value: true, SaveToDb: true);
                    Count.setReadOnly(value: true, SaveToDb: true);
                    //MLM
                    if (_CswNbtResources.Modules.IsModuleEnabled(CswEnumNbtModuleName.MLM))
                    {
                        IsRecurring.setHidden(value: false, SaveToDb: true);
                        foreach (string PropName in PropertyName.MLMCmgTabProps)
                        {
                            _CswNbtNode.Properties[PropName].setHidden(value: false, SaveToDb: true);
                        }
                        foreach (string PropName in PropertyName.MLMReceiveTabProps)
                        {
                            _CswNbtNode.Properties[PropName].setHidden(value: false, SaveToDb: true);
                        }
                    }
                }
                switch (Status.Value)
                {
                case Statuses.Received:
                    Fulfill.State = FulfillMenu.Dispense;
                    break;

                case Statuses.Dispensed:
                    if (TotalDispensed.Quantity >= Quantity.Quantity)
                    {
                        Fulfill.State = FulfillMenu.Complete;
                    }
                    break;

                case Statuses.Moved:
                    if (TotalMoved.Value >= Count.Value)
                    {
                        Fulfill.State = FulfillMenu.Complete;
                    }
                    break;

                case Statuses.Ordered:
                    Fulfill.State = FulfillMenu.Receive;
                    break;
                }
            }
        }