Пример #1
0
        public string ReviewRecord(string name)
        {
            IncomeRecord record = records.FirstOrDefault(x => x.HolderName == name);
            string       result = record.ToString();

            return(result);
        }
Пример #2
0
        public string AddNewRecord(string newName, decimal income)
        {
            decimal      taxedAmount = taxMachine.ApplyTaxation(income);
            IncomeRecord newRecord   = new IncomeRecord(newName, income, taxedAmount);

            records.Add(newRecord);
            return(newRecord.ToString());
        }