Ejemplo n.º 1
0
        private List <ResultTableItem1> GetResultTableItems(Result result)
        {
            Dictionary <String, ResultTableItem1> resultTableItems = new Dictionary <String, ResultTableItem1>();


            foreach (Category category in result.outputCategoryList)
            {
                foreach (FeatureDetail featureDetail in category.FeatureDetails)
                {
                    if (featureDetail.DisplayPreference == Constants.DisplayPreference.RESULT_PAGE || featureDetail.DisplayPreference == Constants.DisplayPreference.RESULT_AND_DETAIL_PAGE)
                    {
                        if (!resultTableItems.ContainsKey(featureDetail.ParameterName))
                        {
                            ResultTableItem1 resultTableItem = new ResultTableItem1();
                            resultTableItem.ParameterName = featureDetail.ParameterName;
                            resultTableItem.Values        = new List <string>();
                            resultTableItems.Add(featureDetail.ParameterName, resultTableItem);
                        }
                        if (category.MOSValue.Equals(Properties.Resources.NA))
                        {
                            resultTableItems[featureDetail.ParameterName].Values.Add(Properties.Resources.NA);
                        }
                        else
                        {
                            resultTableItems[featureDetail.ParameterName].Values.Add(featureDetail.Value.ToString("0.00") + " +/- " + featureDetail.StandardError.ToString("0.00"));
                        }
                    }
                }
            }
            return(resultTableItems.Values.ToList <ResultTableItem1>());
        }
Ejemplo n.º 2
0
        private List<ResultTableItem1> GetResultTableItems(Result result)
        {
            Dictionary<String,ResultTableItem1> resultTableItems = new Dictionary<String,ResultTableItem1>();


            foreach (Category category in result.outputCategoryList)
            {
                foreach (FeatureDetail featureDetail in category.FeatureDetails)
                {
                    if (featureDetail.DisplayPreference == Constants.DisplayPreference.RESULT_PAGE || featureDetail.DisplayPreference == Constants.DisplayPreference.RESULT_AND_DETAIL_PAGE)
                    {
                        if (!resultTableItems.ContainsKey(featureDetail.ParameterName))
                        {
                            ResultTableItem1 resultTableItem = new ResultTableItem1();
                            resultTableItem.ParameterName = featureDetail.ParameterName;
                            resultTableItem.Values = new List<string>();
                            resultTableItems.Add(featureDetail.ParameterName, resultTableItem);
                        }
                        if (category.MOSValue.Equals(Properties.Resources.NA))
                        {
                            resultTableItems[featureDetail.ParameterName].Values.Add(Properties.Resources.NA);
                        }
                        else
                        {
                            resultTableItems[featureDetail.ParameterName].Values.Add(featureDetail.Value.ToString("0.00") + " +/- " + featureDetail.StandardError.ToString("0.00"));
                        }
                    }
                }
            }
            return resultTableItems.Values.ToList<ResultTableItem1>();
        }