Ejemplo n.º 1
0
 /// <summary>
 /// Populate the list of currencies for the Create / Edit form.
 /// </summary>
 /// <param name="taxModel"></param>
 private void PopulateDropDownLists(TaxEditModel taxModel)
 {
     taxModel.AvailableCurrencies = _currencyService.GetCurrencies().Select(x => new SelectListItem()
     {
         Value = x.Id.ToString(), Text = x.Name
     }).ToList();
     taxModel.AvailableCountries = _countryService.GetCountries().Select(x => new SelectListItem()
     {
         Value = x.Id.ToString(), Text = x.Name
     }).ToList();
     taxModel.AvailableFrequenceOptions = _frequenceOptionService.GetFrequencyOptions().Select(x => new SelectListItem()
     {
         Value = x.Id.ToString(), Text = x.Name
     }).ToList();
     taxModel.AvailableTaxTypes = _taxTypeService.GetTaxTypes().Select(x => new SelectListItem()
     {
         Value = x.Id.ToString(), Text = x.Name
     }).ToList();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Return the list of tax types.
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            var model = _taxTypeService.GetTaxTypes();

            return(View(model));
        }
 public IEnumerable <TaxTypeList> GetList()
 {
     return(_TaxTypeService.GetTaxTypes());
 }