Exemplo n.º 1
0
 private string[] GetUserNames(global::SoftFluent.Samples.GED.Security.UserCollection users)
 {
     string[] names = new string[users.Count];
     for (int i = 0; i < users.Count; i++)
     {
         names[i] = users[i].UserName;
     }
     return(names);
 }
        public virtual ProfileInfoCollection ProfileInfoCollectionFromCollection(global::SoftFluent.Samples.GED.Security.UserCollection users)
        {
            ProfileInfoCollection profiles = new ProfileInfoCollection();

            foreach (global::SoftFluent.Samples.GED.Security.User user in users)
            {
                profiles.Add(ProfileInfoFromUser(user));
            }
            return(profiles);
        }
Exemplo n.º 3
0
        public override MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out int totalRecords)
        {
            global::SoftFluent.Samples.GED.Security.UserCollection users = global::SoftFluent.Samples.GED.Security.UserCollection.PageLoadAll(pageIndex, pageSize, null);
            MembershipUserCollection musers = MembershipUserCollectionFromCollection(users);

            if ((musers.Count == 0) || (musers.Count < pageSize))
            {
                totalRecords = pageSize * pageIndex + musers.Count;
            }
            else
            {
                totalRecords = pageSize * (pageIndex + 1) + 1;     // force next page read
            }
            return(musers);
        }
Exemplo n.º 4
0
        public override MembershipUserCollection FindUsersByName(string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
        {
            global::SoftFluent.Samples.GED.Security.UserCollection users = global::SoftFluent.Samples.GED.Security.UserCollection.PageFindByUserName(pageIndex, pageSize, null, usernameToMatch);
            MembershipUserCollection musers = MembershipUserCollectionFromCollection(users);

            if ((musers.Count == 0) || (musers.Count < pageSize))
            {
                totalRecords = pageSize * pageIndex + musers.Count;
            }
            else
            {
                totalRecords = pageSize * (pageIndex + 1) + 1;     // force next page read
            }
            return(musers);
        }
        public override ProfileInfoCollection GetAllProfiles(ProfileAuthenticationOption authenticationOption, int pageIndex, int pageSize, out int totalRecords)
        {
            global::SoftFluent.Samples.GED.Security.UserCollection users = global::SoftFluent.Samples.GED.Security.UserCollection.PageLoadAllProfiles(pageIndex, pageSize, null, (int)authenticationOption);
            ProfileInfoCollection profiles = ProfileInfoCollectionFromCollection(users);

            if ((profiles.Count == 0) || (profiles.Count < pageSize))
            {
                totalRecords = pageSize * pageIndex + profiles.Count;
            }
            else
            {
                totalRecords = pageSize * (pageIndex + 1) + 1;     // force next page read
            }
            return(profiles);
        }
        public override ProfileInfoCollection FindInactiveProfilesByUserName(ProfileAuthenticationOption authenticationOption, string usernameToMatch, DateTime userInactiveSinceDate, int pageIndex, int pageSize, out int totalRecords)
        {
            global::SoftFluent.Samples.GED.Security.UserCollection users = global::SoftFluent.Samples.GED.Security.UserCollection.PageFindInactiveProfilesByUserName(pageIndex, pageSize, null, (int)authenticationOption, usernameToMatch, userInactiveSinceDate);
            ProfileInfoCollection profiles = ProfileInfoCollectionFromCollection(users);

            if ((profiles.Count == 0) || (profiles.Count < pageSize))
            {
                totalRecords = pageSize * pageIndex + profiles.Count;
            }
            else
            {
                totalRecords = pageSize * (pageIndex + 1) + 1;     // force next page read
            }
            return(profiles);
        }
Exemplo n.º 7
0
        public virtual MembershipUserCollection MembershipUserCollectionFromCollection(global::SoftFluent.Samples.GED.Security.UserCollection users)
        {
            MembershipUserCollection musers = new MembershipUserCollection();

            foreach (global::SoftFluent.Samples.GED.Security.User user in users)
            {
                musers.Add(MembershipUserFromUser(user));
            }
            return(musers);
        }