Пример #1
0
        public void AddPaymentToDepot(double payment, Taxcode taxcode)
        {
            switch (taxcode)
            {
            case Taxcode.Ratepension:
                for (var i = 0; i < _savingProducts.Count; i++)
                {
                    if (_savingProducts[i].HaveRate() == true)
                    {
                        _savingProducts[i].AddDeposit(payment);
                    }
                }

                break;

            case Taxcode.Livrente:
                for (var i = 0; i < _savingProducts.Count; i++)
                {
                    if (_savingProducts[i].HaveRate() == false)
                    {
                        _savingProducts[i].AddDeposit(payment);
                    }
                }

                break;
            }
        }
Пример #2
0
 public Payment(DateTime date, double amount, Taxcode taxcode)
 {
     this._date    = date;
     this._amount  = amount;
     this._taxcode = taxcode;
 }