Exemplo n.º 1
0
        public ActionResult Create(TaxRateEditViewModel model)
        {
            if (ModelState.IsValid)
            {
                var taxRate = taxRateService.AddOrUpdate(model);

                return(RedirectToAction("Index")
                       .WithSuccess(string.Format("The tax rate \"{0}\" has been added".TA(), taxRate.Name)));
            }

            ViewBag.TaxZoneId = new SelectList(taxZoneService.FindAll().Where(z => z.IsActive).ToList(), "Id", "Name");
            return(View(model));
        }