Пример #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;
        }
Пример #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);
 }
Пример #3
0
 public CalculationModel(CalculationSet calculationSet)
     : this()
 {
     this.CalculationSet = calculationSet;
 }