private InputParameters GetInputParameter(HotelOperatingModel operatingModel)
        {
            InputParameters inputs = new InputParameters()
            {
                TotalRooms         = operatingModel.numberOfRooms,
                AnnualVisitors     = operatingModel.cityAnnualVisitor,
                MedianIncome       = operatingModel.cityMedianIncome,
                NearestCompetition = operatingModel.nearestCompetition
            };

            return(inputs);
        }
 public ActionResult Index(HotelOperatingModel operatingModel)
 {
     if (ModelState.IsValid)
     {
         var    client  = GetAuthenticatedClient();
         var    inputs  = GetInputParameter(operatingModel);
         var    results = client.CheckOperatingMargin(inputs);
         double?score   = null;
         if (results != null)
         {
             score = results.OutputParameters.Margin;
         }
         ViewBag.operatingmarginlevel = IsMarginGood(score);
         return(View());
     }
     else
     {
         return(View(operatingModel));
     }
 }