Пример #1
0
        public void GetMetrics(IMetricTypeRepository metricRepository)
        {
            //MetricTypeRepositoryFactory.SetMetricsRepository(new TestMetricTypeRepository());

            var metricTypes = metricRepository.GetAllToDisplayMetrics().OrderBy(m => m.DisplayOrder);

            MapMetricsList = new List <SelectListItem>();
            foreach (var m in metricTypes)
            {
                MapMetricsList.Add(new SelectListItem {
                    Value = m.MetricID.ToString(), Text = m.ChartName
                });
            }
        }
Пример #2
0
        public void GetMetrics()
        {
            //MetricTypeRepositoryFactory.SetMetricsRepository(new TestMetricTypeRepository());
            IMetricTypeRepository repository = MetricTypeRepositoryFactory.Create();
            List <MOE.Common.Models.MetricType> metricTypes = repository.GetAllToDisplayMetrics();

            MapMetricsList = new List <SelectListItem>();
            foreach (MOE.Common.Models.MetricType m in metricTypes)
            {
                MapMetricsList.Add(new SelectListItem {
                    Value = m.MetricID.ToString(), Text = m.ChartName
                });
            }
        }