예제 #1
0
        public UsersList()
        {
            var list = _context.SubmittedeStatusForUsers.ToList();

            foreach (var user in _context.UserPurchases)
            {
                SubmittedStatusForUser completeStatus = (from x in list.OfType <SubmittedStatusForUser>() where x.UserId == user.Id select x).FirstOrDefault();
                var userEntry = new UserEntry
                {
                    User = user,
                    WasCompleteQuestionnaire = (completeStatus != null)
                };
                _users.Add(userEntry);
            }
            _users = _users.OrderBy(x => x.User.Name).ToList();
        }
예제 #2
0
        public UsersList()
        {
            var list = _context.SubmittedeStatusForUsers.ToList();
            foreach (var user in _context.UserPurchases)
            {
                    SubmittedStatusForUser completeStatus = (from x in list.OfType<SubmittedStatusForUser>() where x.UserId == user.Id select x).FirstOrDefault();
                    var userEntry = new UserEntry
                    {
                        User = user,
                        WasCompleteQuestionnaire = (completeStatus != null)
                    };
                    _users.Add(userEntry);

            }
            _users = _users.OrderBy(x => x.User.Name).ToList();
        }