Beispiel #1
0
 public IActionResult OnGet(int id)
 {
     TaxPayer = taxPayerRepository.Get(id);
     Product  = new Product();
     SetUpStaticData();
     return(Page());
 }
        public IActionResult OnGet(int id)
        {
            TaxPayer  = taxPayerService.Get(id);
            SelectDDV = ddvService.GetAll().Select(d => new SelectListItem
            {
                Text  = d.Tax.ToString(),
                Value = d.Id.ToString()
            });

            Product = new Core.Product();


            return(Page());
        }
Beispiel #3
0
        public IActionResult OnGet(int?id)
        {
            if (id.HasValue)
            {
                TaxPayer = taxPayerRepository.Get(x => x.Id == id.Value);
            }
            else
            {
                TaxPayer = new Core.TaxPayer();
            }

            SetStaticData();
            return(Page());
        }
 private void SetUpStaticData()
 {
     TaxPayer = taxPayerRepository.Get(Product.TaxPayerId);
     DDVs     = new SelectList(ddvRepository.GetAll().Select(p => new { Id = p.Id, Display = p.Tax.ToString("p") }), "Id", "Display");
 }