예제 #1
0
        public ActionResult GeoChart()
        {
            var dic = new List <DictionaryRegion>();

            dic.Add(new DictionaryRegion {
                Key = "Московская область", SearcOptions = new List <string> {
                    "МО", "Московская область"
                }
            });
            dic.Add(new DictionaryRegion {
                Key = "Москва", SearcOptions = new List <string> {
                    "Москва"
                }
            });
            dic.Add(new DictionaryRegion {
                Key = "Краснодарский край", SearcOptions = new List <string> {
                    "Краснодарский край"
                }
            });
            dic.Add(new DictionaryRegion {
                Key = "Татарстан", SearcOptions = new List <string> {
                    "Татарстан"
                }
            });
            dic.Add(new DictionaryRegion {
                Key = "Санкт-Петербург", SearcOptions = new List <string> {
                    "Санкт-Петербург"
                }
            });
            dic.Add(new DictionaryRegion {
                Key = "Курская область", SearcOptions = new List <string> {
                    "Курская область"
                }
            });
            dic.Add(new DictionaryRegion {
                Key = "Массачусетс", SearcOptions = new List <string> {
                    "Массачусетс"
                }
            });
            dic.Add(new DictionaryRegion {
                Key = "Нижегородская область", SearcOptions = new List <string> {
                    "Нижегородская область"
                }
            });
            dic.Add(new DictionaryRegion {
                Key = "California", SearcOptions = new List <string> {
                    "California"
                }
            });
            dic.Add(new DictionaryRegion {
                Key = "Ростовская область", SearcOptions = new List <string> {
                    "Ростовская область"
                }
            });
            dic.Add(new DictionaryRegion {
                Key = "Самарская область", SearcOptions = new List <string> {
                    "Самарская область"
                }
            });
            dic.Add(new DictionaryRegion {
                Key = "Ямало-Ненецкий АО", SearcOptions = new List <string> {
                    "Ямало-Ненецкий АО"
                }
            });
            dic.Add(new DictionaryRegion {
                Key = "Свердловская область", SearcOptions = new List <string> {
                    "Свердловская область"
                }
            });

            for (int i = 0; i < dic.Count; i++)
            {
                dic[i].Value = statisticsRepository.GetAllVisitByNameRegion(dic[i].SearcOptions);
            }

            return(View(dic));
        }