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); }
// 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)); }
public ActionResult ViewTax(int id, string transactionType) { var result = taxService.Get(id); ViewBag.TransactionType = transactionType; return(View(result)); }