public ActionResult FormatInput(string formatString, string inputString, string cultureString)
        {
            CultureInfo culture = new CultureInfo(cultureString);
            char decimalSeperator = culture.NumberFormat.CurrencyDecimalSeparator.ToCharArray()[0];

            FormatStringAdapter adapter = new FormatStringAdapter(decimalSeperator);
            adapter.SetFormatString(formatString);

            string formattedString;
            adapter.Format(out formattedString, inputString);

            return Json(new { Success = !string.IsNullOrEmpty(formattedString), DisplayString = formattedString });
        }
        public async Task<ActionResult> RequestValue(RequestValueViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return HandleGeneralError("Index", ProductCalculationViewModel.Create(EQueryType.None), "Product Calculation Error");
            }
            EnvironmentInfo environment = GetEnvironment();
            if (null == environment)
            {
                return HandleGeneralError("Index", ProductCalculationViewModel.Create(EQueryType.None), "Unable to retrieve environment information");
            }
            CultureInfo culture = new CultureInfo(environment.Culture);
            char decimalSeperator = culture.NumberFormat.CurrencyDecimalSeparator.ToCharArray()[0];

            FormatStringAdapter adapter = new FormatStringAdapter(decimalSeperator);
            adapter.SetFormatString(model.FormatString);

            string formattedString;
            adapter.Format(out formattedString, model.EnteredRawValue);

            var actionResult = new ActionResultInfo()
            {
                Action = model.QueryType == EQueryType.RequestValue ? EActionId.RequestValue :
                model.QueryType == EQueryType.RequestPostage ? EActionId.ManualPostage : EActionId.RequestString,
                Results = new List<AnyInfo>()
            };

            uint numberOfEntries = adapter.GetValueNumber();
            for (uint i = 0; i < numberOfEntries; ++i)
            {
                object valuePart = adapter.GetValue(formattedString, i);
                if (valuePart != null)
                {
                    actionResult.Results.Add(new AnyInfo()
                    {
                        AnyType = model.QueryType == EQueryType.RequestString ? EAnyType.STRING : EAnyType.UINT32,
                        AnyValue = valuePart.ToString()
                    });
                }
            }
            return await HandleCalculation(actionResult, environment);
        }