Example #1
0
        public string Calculate(CalculationSet calculationSet)
        {
            if (Request.IsAjaxRequest())
            {
                var calculationService = calculationSet.GetCalculationService(calculationSet.submitAction);
                var result = calculationService.Calculate(calculationSet.Param1, calculationSet.Param2);

                return result.ToString();
            }

            return string.Empty;
        }
Example #2
0
 public ActionResult Index()
 {
     ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";
     var model = new CalculationSet();
     return View(model);
 }
Example #3
0
 public CalculationModel(CalculationSet calculationSet)
     : this()
 {
     this.CalculationSet = calculationSet;
 }