Esempio n. 1
0
        public IActionResult TaxEditor(int taxId)
        {
            var tax = taxId > 0 ? _taxService.Get(taxId) : new Tax();

            if (tax == null)
            {
                return(NotFound());
            }
            var taxModel = _modelMapper.Map <TaxModel>(tax);

            return(R.Success.With("tax", taxModel).Result);
        }
Esempio n. 2
0
        // GET: Taxes/Details/5
        public ActionResult Details(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TaxViewModel tax = Mapper.Map <TaxViewModel>(taxService.Get(id.Value));;

            if (tax == null)
            {
                return(HttpNotFound());
            }
            return(View(tax));
        }
Esempio n. 3
0
        public ActionResult ViewTax(int id, string transactionType)
        {
            var result = taxService.Get(id);

            ViewBag.TransactionType = transactionType;
            return(View(result));
        }