示例#1
0
        public ActionResult Recalculate(CalculationsViewModel1.FirstCalculation calcultionInputs)
        {
            calcultionInputs.AddressCountry = GetSelectListItems(GetAllAddressCountries());
            calcultionInputs.WorkCountry    = GetSelectListItems(GetAllWorkCountries());
            calcultionInputs.PerTime        = GetSelectListItems(GetAllPerTime());
            calcultionInputs.Currency       = GetSelectListItems(GetAllCurrencies());

            var client = new NodeCommunication();

            calcultionInputs.CalculationResult = client.SendSecondCalculation(calcultionInputs);
            return(this.Json(new { success = true, result = calcultionInputs.CalculationResult }));
        }
示例#2
0
        public ActionResult Index(CalculationsViewModel1.FirstCalculation calcultionInputs)
        {
            calcultionInputs.AddressCountry = GetSelectListItems(GetAllAddressCountries());
            calcultionInputs.WorkCountry    = GetSelectListItems(GetAllWorkCountries());
            calcultionInputs.PerTime        = GetSelectListItems(GetAllPerTime());
            calcultionInputs.Currency       = GetSelectListItems(GetAllCurrencies());
            if (!ModelState.IsValid)
            {
                return(View("Index", calcultionInputs));
            }


            var client = new NodeCommunication();

            calcultionInputs.CalculationResult = client.SendFirstCalculation(calcultionInputs);
            return(this.Json(new { success = true, result = calcultionInputs.CalculationResult }));
        }