Exemplo n.º 1
0
        /// <summary>
        /// If the payment method has not been modified, update it with an existing debt rule.
        /// </summary>
        /// <param name="debtRulePaymentMethodRow">The payment method row to update from.</param>
        public void Update(DebtRulePaymentMethodRow debtRulePaymentMethodRow)
        {
            if (!this.Dirty && debtRulePaymentMethodRow.PaymentMethodTypeId == this.PaymentMethodTypeId && debtRulePaymentMethodRow.RowVersion != this.RowVersion)
            {
                this.paymentMethodId     = debtRulePaymentMethodRow.DebtRulePaymentMethodId;
                this.paymentMethodTypeId = debtRulePaymentMethodRow.PaymentMethodTypeId;
                this.debtRuleId          = debtRulePaymentMethodRow.DebtRuleId;
            }

            this.rowVersion = debtRulePaymentMethodRow.RowVersion;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Create a payment method from a payment method row.
        /// </summary>
        /// <param name="debtRulePaymentMethodRow">The payment method row in the DataModel.</param>
        public PaymentMethod(DebtRulePaymentMethodRow debtRulePaymentMethodRow)
        {
            PaymentMethodTypeRow type = debtRulePaymentMethodRow.PaymentMethodTypeRow;

            this.paymentMethodId     = debtRulePaymentMethodRow.DebtRulePaymentMethodId;
            this.paymentMethodTypeId = debtRulePaymentMethodRow.PaymentMethodTypeId;
            this.typeName            = type.Name;
            this.debtRuleId          = debtRulePaymentMethodRow.DebtRuleId;
            this.rowVersion          = debtRulePaymentMethodRow.RowVersion;
            this.dirty  = false;
            this.delete = false;
        }