public void DeletePaymentRule(IPaymentRule paymentRuleEntity)
        {
            PaymentRuleEntity paymentRule = (PaymentRuleEntity)paymentRuleEntity;

            paymentRule.Deleted = true;

            SupplierEntity supplier = (SupplierEntity)(paymentRule.Supplier);

            supplier.RemovePaymentRule(paymentRule);
        }
        public IPaymentRule CreatePaymentRule(ISupplier supplierEntity, ICustomer customerEntity,
                                              BookingType bookingType, decimal percentage, int daysOffset, BaseDate baseDate, PaymentType paymentType)
        {
            PaymentRuleEntity paymentRule = new PaymentRuleEntity(supplierEntity, customerEntity, bookingType,
                                                                  percentage, daysOffset, baseDate, paymentType);

            SupplierEntity supplier = (SupplierEntity)supplierEntity;

            supplier.AddPaymentRule(paymentRule);

            return(paymentRule);
        }
        public void UpdatePaymentRule(IPaymentRule paymentRuleEntity)
        {
            PaymentRuleEntity paymentRule = (PaymentRuleEntity)paymentRuleEntity;

            paymentRule.LastModified = DateTime.Now;
        }