public JsonResult SettingsPricingModelForScenario(long scenarioID) { PricingModelModelActionResult getPricingModelModelResponse = this.serviceClient.Instance.GetPricingScenarioDetails(this._context.UserId, scenarioID); return(Json(getPricingModelModelResponse.Value, JsonRequestBehavior.AllowGet)); } // SettingsPricingModelForScenario
public ActionResult GetScenarioConfigs(int customerId, string scenarioName) { PricingCalcuatorScenarioNames[] names = (PricingCalcuatorScenarioNames[])Enum.GetValues(typeof(PricingCalcuatorScenarioNames)); PricingCalcuatorScenarioNames?name = null; foreach (var n in names) { if (n.DescriptionAttr() == scenarioName) { name = n; break; } // if } // foreach if (name == null) { throw new Exception("Unknown scenario name: " + scenarioName); } PricingModelModelActionResult getPricingModelModelResponse = this.serviceClient.Instance.GetPricingModelModel(customerId, this.context.UserId, name.Value); return(Json(getPricingModelModelResponse.Value, JsonRequestBehavior.AllowGet)); } // GetScenarioConfigs
public JsonResult SettingsPricingModel() { PricingModelModelActionResult getPricingModelModelResponse = this.serviceClient.Instance.GetPricingModelModel( 0, this._context.UserId, PricingCalcuatorScenarioNames.BasicNew ); return(Json(getPricingModelModelResponse.Value, JsonRequestBehavior.AllowGet)); }
public JsonResult Calculate(int customerId, string pricingModelModel) { var oLog = new SafeILog(this); oLog.Debug("Model received: {0}", pricingModelModel); PricingModelModel inputModel = JsonConvert.DeserializeObject <PricingModelModel>(pricingModelModel); oLog.Debug("Parsed model: {0}", JsonConvert.SerializeObject(inputModel)); PricingModelModelActionResult pricingModelCalculateResponse = this.serviceClient.Instance.PricingModelCalculate(customerId, this.context.UserId, inputModel); oLog.Debug("Calculated model: {0}", JsonConvert.SerializeObject(pricingModelCalculateResponse.Value)); return(Json(pricingModelCalculateResponse.Value, JsonRequestBehavior.AllowGet)); } // Calculate