Ejemplo n.º 1
0
        public IActionResult Index(Quotation quote)
        {
            if (ModelState.IsValid)

            {
                ViewBag.Discount = quote.CalculateDiscount();
                ViewBag.Total    = quote.CalculateTotal();
            }
            else
            {
                ViewBag.Discount = 0;
                ViewBag.Total    = 0;
            }
            return(View(quote));
        }