Exemplo n.º 1
0
 public override void ComposeFilters(IEnumerable <User> users)
 {
     MasterFilters = FilterItems;
     FilterItems   = new List <FilterItem>();
     foreach (var item in _intFilter)
     {
         var fItem = new FilterItem(_checkedItems.Contains(item.Key))
         {
             Count     = users.Where(item.Value).Count(),
             ValueText = item.Key
         };
         FilterItems.Add(fItem);
     }
     MasterFilters = FilterItems;
 }
Exemplo n.º 2
0
 public override void ComposeFilters(IEnumerable <Circle> items)
 {
     MasterFilters = FilterItems;
     FilterItems   = new List <FilterItem>();
     foreach (var item in items)
     {
         var fItem = new FilterItem(_checkedItems.Contains(item.Name))
         {
             Count     = item.Members.Count,
             ValueText = item.Name,
             ItemId    = item.CircleId,
             Url       = Routes.EditCircle
         };
         FilterItems.Add(fItem);
     }
 }
Exemplo n.º 3
0
        public override void ComposeFilters(IEnumerable<User> users)
        {
            MasterFilters = FilterItems;
            FilterItems = new List<FilterItem>();
            var verfiedUsers = users.Where(u => u.EmailConfirmedOn != null)
                            .ToList();

            var cfItem = new FilterItem(_checkedItems.Contains(CONN))
            {
                Count = verfiedUsers.Count,
                ValueText = CONN
            };
            FilterItems.Add(cfItem);

            var ncfItem = new FilterItem(_checkedItems.Contains(N_CONN))
            {
                Count = users.Count() - verfiedUsers.Count,
                ValueText = N_CONN
            };
            FilterItems.Add(ncfItem);
            MasterFilters = FilterItems;
        }
Exemplo n.º 4
0
        public override void ComposeFilters(IEnumerable <User> users)
        {
            MasterFilters = FilterItems;
            FilterItems   = new List <FilterItem>();
            var verfiedUsers = users.Where(u => u.EmailConfirmedOn != null)
                               .ToList();

            var cfItem = new FilterItem(_checkedItems.Contains(CONN))
            {
                Count     = verfiedUsers.Count,
                ValueText = CONN
            };

            FilterItems.Add(cfItem);

            var ncfItem = new FilterItem(_checkedItems.Contains(N_CONN))
            {
                Count     = users.Count() - verfiedUsers.Count,
                ValueText = N_CONN
            };

            FilterItems.Add(ncfItem);
            MasterFilters = FilterItems;
        }
Exemplo n.º 5
0
        public override void ComposeFilters(IEnumerable<User> users)
        {
            MasterFilters = FilterItems;
            FilterItems = new List<FilterItem>();
            var connectSrv = new ConnectService();
            var connIds = connectSrv.GetConnectReqIds(ConnectStatusType.Accepted);
            var connUsers = users.Where(u => connIds.Contains(u.UserId))
                            .ToList();
            var cfItem = new FilterItem(_checkedItems.Contains(CONN))
            {
                Count = connUsers.Count,
                ValueText = CONN
            };
            FilterItems.Add(cfItem);

            var ncfItem = new FilterItem(_checkedItems.Contains(N_CONN))
            {
                Count = users.Count() - connUsers.Count,
                //Count = users.Count(u => !u.IsRelative()) - connUsers.Count,
                ValueText = N_CONN
            };
            FilterItems.Add(ncfItem);
            MasterFilters = FilterItems;
        }