Exemplo n.º 1
0
        //
        // GET: /Flooring/
        public ActionResult Index()
        {
            var rates = new CostsPerSqFoot();

            var model = new CostDetails(rates.RatesList);

            return View(model);
        }
Exemplo n.º 2
0
        public ActionResult Calculations(CostDetails model)
        {
            var rates = new CostsPerSqFoot();

            if (ModelState.IsValid)
            {
                model.SelectedRate = rates.RatesList.FirstOrDefault(s => s.Id == model.SelectedId);
                model.CalculateTotalCosts(model);
                return View(model);
            }

            else
                return View("Index", model);
        }