예제 #1
0
 public GenderInformation GetGenderInformation(int projectId)
 {
     using (this.unitOfWorkProvider.CreateUnitOfWork())
     {
         CategorialValue categories = this.statisticsProvider.GetGenderInformation(projectId);
         return(GenderInformation.Create(categories));
     }
 }
예제 #2
0
        public GenderInformation GetGenderInformationActiveUsers(int projectId, long filterCode)
        {
            using (this.unitOfWorkProvider.CreateUnitOfWork())
            {
                var vkGroup         = this.projectRepository.GetVkGroup(projectId);
                var filteringResult = this.GetFilteringResult(vkGroup, filterCode);

                CategorialValue categories = this.searcher.GetGenderInformationActiveUsers(vkGroup.Id, filteringResult);
                return(GenderInformation.Create(categories));
            }
        }
예제 #3
0
        public GenderInformation GetGenderInformationActiveUsers(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.GetGenderInformationActiveUsers(vkGroup.Id, filteringResult);
                return(GenderInformation.Create(categories));
            }
        }
예제 #4
0
        private PieChartData GetPieChartData(GenderInformation genderInformation)
        {
            PieChartData pieChartData = new PieChartData();

            pieChartData.AddItem(new PieChartDataItem()
            {
                Label = "Мужчины", Value = genderInformation.Males
            });
            pieChartData.AddItem(new PieChartDataItem()
            {
                Label = "Женщины", Value = genderInformation.Females
            });
            pieChartData.AddItem(new PieChartDataItem()
            {
                Label = "Не указано", Value = genderInformation.Unknown
            });

            return(pieChartData);
        }
예제 #5
0
        public PieChartData GetPieChartDataActiveUsers(int projectId, IList <ActiveUserInfo> userList)
        {
            GenderInformation genderInformation = this.searchService.GetGenderInformationActiveUsers(projectId, userList);

            return(this.GetPieChartData(genderInformation));
        }
예제 #6
0
        public PieChartData GetPieChartDataActiveUsers(int projectId, long filterCode)
        {
            GenderInformation genderInformation = this.searchService.GetGenderInformationActiveUsers(projectId, filterCode);

            return(this.GetPieChartData(genderInformation));
        }
예제 #7
0
        public PieChartData GetPieChartData(int projectId)
        {
            GenderInformation genderInformation = this.statisticsProvider.GetGenderInformation(projectId);

            return(this.GetPieChartData(genderInformation));
        }