public TaxLogic(ITaxDataAccess taxDataAccess) { TaxEventHandler taxEventHandler; Key key; _taxDataAccess = taxDataAccess; _taxController = new TaxController <Key, TaxEventHandler>(); //set up tax handlers taxEventHandler = new ProgressiveTaxEvent(_taxDataAccess); key = new Key { TaxCode = "7441" }; _taxController.AddEventHandler(key, taxEventHandler); taxEventHandler = new FlatValueTaxEvent(_taxDataAccess); key = new Key { TaxCode = "A100" }; _taxController.AddEventHandler(key, taxEventHandler); taxEventHandler = new FlatRateTaxEvent(_taxDataAccess); key = new Key { TaxCode = "7000" }; _taxController.AddEventHandler(key, taxEventHandler); taxEventHandler = new ProgressiveTaxEvent(_taxDataAccess); key = new Key { TaxCode = "1000" }; _taxController.AddEventHandler(key, taxEventHandler); }
public FlatValueTaxEvent(ITaxDataAccess taxDataAccess) { _taxDataAccess = taxDataAccess; }
public ProgressiveTaxEvent(ITaxDataAccess taxDataAccess) { _taxDataAccess = taxDataAccess; }
public FlatRateTaxEvent(ITaxDataAccess taxDataAccess) { _taxDataAccess = taxDataAccess; }