Beispiel #1
0
 public IActionResult EditProduct(int productId)
 {
     return(View(new ProductEditViewModel
     {
         Product = _productRepository.GetProduct(productId),
         VatRates = _dictionaryContainer.VatRateRepository.VatRates,
         DefaultPriceType = (PriceType)Enum.Parse(typeof(PriceType), _paramRepository.GetParameter(SystemParameters.ProductPriceType).Value)
     }));
 }
        public IActionResult Index()
        {
            SalesParametersIndexViewModel model = new SalesParametersIndexViewModel
            {
                VatRates          = _dictionaryContainer.VatRateRepository.VatRates.OrderBy(vr => vr.Symbol).ToList(),
                SelectedPriceType = _paramRepository.GetParameter(SystemParameters.ProductPriceType).Value
            };

            return(View(model));
        }