private PieChartData GetEducationPieChartData(EducationLevelInformation data)
        {
            var pieChartData = new PieChartData();

            pieChartData.AddItem(new PieChartDataItem()
            {
                Label = "Не указано", Value = data.Unknown
            });
            pieChartData.AddItem(new PieChartDataItem()
            {
                Label = "Среднее", Value = data.Middle
            });
            pieChartData.AddItem(new PieChartDataItem()
            {
                Label = "Неоконченное высшее", Value = data.UncompletedHigher
            });
            pieChartData.AddItem(new PieChartDataItem()
            {
                Label = "Высшее", Value = data.Higher
            });
            pieChartData.AddItem(new PieChartDataItem()
            {
                Label = "Доктор наук", Value = data.PhD
            });

            return(pieChartData);
        }
Beispiel #2
0
 public EducationLevelInformation GetEducationLevelInformation(int projectid)
 {
     using (this.unitOfWorkProvider.CreateUnitOfWork())
     {
         CategorialValue categories = this.statisticsProvider.GetEducationLevelInformation(projectid);
         return(EducationLevelInformation.Create(categories));
     }
 }
Beispiel #3
0
        public EducationLevelInformation GetEducationLevelInformationActiveUsers(int projectId, long filterCode)
        {
            using (this.unitOfWorkProvider.CreateUnitOfWork())
            {
                var vkGroup         = this.projectRepository.GetVkGroup(projectId);
                var filteringResult = this.GetFilteringResult(vkGroup, filterCode);

                CategorialValue categories = this.searcher.GetEducationLevelInformationActiveUsers(vkGroup.Id, filteringResult);
                return(EducationLevelInformation.Create(categories));
            }
        }
Beispiel #4
0
        public EducationLevelInformation GetEducationLevelInformationActiveUsers(int projectId, IList <ActiveUserInfo> users)
        {
            IList <MemberMainInfo> members = this.ToMemberMainInfo(users);

            using (this.unitOfWorkProvider.CreateUnitOfWork())
            {
                var vkGroup         = this.projectRepository.GetVkGroup(projectId);
                var filteringResult = new AudienceFilteringResult(members);

                CategorialValue categories = this.searcher.GetEducationLevelInformationActiveUsers(vkGroup.Id, filteringResult);
                return(EducationLevelInformation.Create(categories));
            }
        }