Exemple #1
0
 public IActionResult Index(PriceQuotationModel model)   // this Index will take FutureValueModel, process data here
 {
     if (ModelState.IsValid)
     {
         ViewBag.DiscountAmount = model.CalculateDiscountAmount();
         ViewBag.Total          = model.CalculateTotal();
     }
     else
     {
         ViewBag.DiscountAmount = 0;
         ViewBag.Total          = 0;
     }
     return(View(model));
 }
 public IActionResult Index(PriceQuotationModel model)
 {
     if (ModelState.IsValid)
     {
         ViewBag.DA = model.CalculateDiscountAmount();
         ViewBag.PT = model.CalculateTotal();
     }
     else
     {
         ViewBag.DA = 0;
         ViewBag.PT = 0;
     }
     return(View(model));
 }