public SmallGroupMember FromArena(GroupMember arena)
        {
            SmallGroupMember member  = new SmallGroupMember();
            LookupMapper     lMapper = new LookupMapper();
            Group            g       = new Group(arena.GroupID);

            member.PersonID     = arena.PersonID;
            member.FullName     = arena.FullName;
            member.Active       = arena.Active;
            member.PrimaryEmail = arena.Emails.FirstActive;
            Core.PersonPhone phone = arena.Phones.FindByType(Arena.Core.SystemLookup.PhoneType_Cell);
            if (phone != null)
            {
                member.CellPhone = phone.Number;
            }
            phone = arena.Phones.FindByType(Arena.Core.SystemLookup.PhoneType_Home);
            if (phone != null)
            {
                member.HomePhone = phone.Number;
            }

            member.Role  = lMapper.FromArena(arena.Role);
            member.Group = new GenericReference(g);
            if (g.ClusterType.Category.UseUniformNumber == true)
            {
                member.UniformNumber = arena.UniformNumber;
            }

            return(member);
        }
        public SmallGroupMember FromArena(GroupMember arena)
        {
            SmallGroupMember member  = new SmallGroupMember();
            LookupMapper     lMapper = new LookupMapper();
            Group            g       = new Group(arena.GroupID);

            member.PersonID = arena.PersonID;
            member.FullName = arena.FullName;
            member.Active   = arena.Active;
            member.Role     = lMapper.FromArena(arena.Role);
            member.Group    = new GenericReference(g);
            if (g.ClusterType.Category.UseUniformNumber == true)
            {
                member.UniformNumber = arena.UniformNumber;
            }

            return(member);
        }
Example #3
0
        public SmallGroupCategory FromArena(Category arena)
        {
            SmallGroupCategory category = new SmallGroupCategory();
            LookupMapper       lMapper  = new LookupMapper();
            List <Lookup>      roles    = new List <Lookup>();


            category.CategoryID               = arena.CategoryID;
            category.AgeGroupCaption          = arena.AgeGroupCaption;
            category.AllowBulkUpdate          = arena.AllowBulkUpdates;
            category.AllowRegistrations       = arena.AllowRegistrations;
            category.CreditAsSmallGroup       = arena.CreditAsSmallGroup;
            category.DefaultRole              = lMapper.FromArena(arena.DefaultRole);
            category.DescriptionCaption       = arena.DescriptionCaption;
            category.HistoryIsPrivate         = arena.HistoryIsPrivate;
            category.LeaderCaption            = arena.LeaderCaption;
            category.LocationTargetCaption    = arena.LocationTargetCaption;
            category.MaritalPreferenceCaption = arena.MaritalPreferenceCaption;
            category.MaximumMembersCaption    = arena.MaximumMembersCaption;
            category.MeetingDayCaption        = arena.MeetingDayCaption;
            category.Name             = arena.CategoryName;
            category.NameCaption      = arena.NameCaption;
            category.NotesCaption     = arena.NotesCaption;
            category.ParentCaption    = arena.ParentCaption;
            category.PictureCaption   = arena.PictureCaption;
            category.ScheduleCaption  = arena.ScheduleCaption;
            category.TopicCaption     = arena.TopicCaption;
            category.TypeCaption      = arena.TypeCaption;
            category.UrlCaption       = arena.UrlCaption;
            category.UsesArea         = arena.UsesArea;
            category.UseUniformNumber = arena.UseUniformNumber;
            foreach (Core.Lookup lkup in arena.ValidRoles)
            {
                roles.Add(lMapper.FromArena(lkup));
            }
            category.ValidRoles = roles;

            return(category);
        }
        public SmallGroupMember FromArena(GroupMember arena)
        {
            SmallGroupMember member = new SmallGroupMember();
            LookupMapper lMapper = new LookupMapper();
            Group g = new Group(arena.GroupID);

            member.PersonID = arena.PersonID;
            member.FullName = arena.FullName;
            member.Active = arena.Active;
            member.PrimaryEmail = arena.Emails.FirstActive;
            Core.PersonPhone phone = arena.Phones.FindByType(Arena.Core.SystemLookup.PhoneType_Cell);
            if (phone != null) {
                member.CellPhone = phone.Number;
            }
            phone = arena.Phones.FindByType(Arena.Core.SystemLookup.PhoneType_Home);
            if (phone != null) {
                member.HomePhone = phone.Number;
            }

            member.Role = lMapper.FromArena(arena.Role);
            member.Group = new GenericReference(g);
            if (g.ClusterType.Category.UseUniformNumber == true)
                member.UniformNumber = arena.UniformNumber;

            return member;
        }
Example #5
0
        public SmallGroup FromArena(Group arena)
        {
            SmallGroup group = new SmallGroup();
            LookupMapper lMapper = new LookupMapper();

            if (ShouldShow("GroupID") == true)
                group.GroupID = arena.GroupID;

            if (ShouldShow("Active") == true)
                group.Active = arena.Active;

            if (ShouldShow("AreaID") == true)
                group.AreaID = arena.AreaID;

            if (ShouldShow("AverageAge") == true)
                group.AverageAge = arena.AverageAge;

            if (ShouldShow("CategoryID") == true)
                group.CategoryID = arena.ClusterType.CategoryID;

            if (ShouldShow("GroupClusterID") == true)
                group.GroupClusterID = arena.GroupClusterID;

            if (ShouldShow("CreatedBy") == true)
                group.CreatedBy = arena.CreatedBy;

            if (ShouldShow("DateCreated") == true)
                group.DateCreated = arena.DateCreated;

            if (ShouldShow("DateModified") == true)
                group.DateModified = arena.DateModified;

            if (ShouldShow("Description") == true)
                group.Description = arena.Description;

            if (ShouldShow("Distance") == true)
                group.Distance = arena.Distance;

            if (ShouldShow("Leader") == true)
                group.Leader = new GenericReference(arena.Leader);

            if (ShouldShow("ClusterLevelID") == true)
                group.ClusterLevelID = arena.ClusterLevelID;

            if (ShouldShow("MaxMembers") == true)
                group.MaxMembers = arena.MaxMembers;

            if (ShouldShow("MeetingDay") == true)
                group.MeetingDay = lMapper.FromArena(arena.MeetingDay);

            if (ShouldShow("MemberCount") == true)
                group.MemberCount = arena.Members.Count;

            if (ShouldShow("Modifiedby") == true)
                group.ModifiedBy = arena.ModifiedBy;

            if (ShouldShow("Name") == true)
                group.Name = arena.Name;

            if (ShouldShow("NavigationUrl") == true)
                group.NavigationUrl = arena.NavigationUrl;

            if (ShouldShow("Notes") == true)
                group.Notes = arena.Notes;

            if (ShouldShow("PictureUrl") == true) {
                if (arena.ImageBlob != null && arena.ImageBlob.BlobID > 0) {
                    group.PictureUrl = getImageThumbnailUrl(arena.ImageBlob);
                }
            }

            if (ShouldShow("PrimaryAge") == true)
                group.PrimaryAge = lMapper.FromArena(arena.PrimaryAge);

            if (ShouldShow("PrimaryMaritalStatus") == true)
                group.PrimaryMaritalStatus = lMapper.FromArena(arena.PrimaryMaritalStatus);

            if (ShouldShow("Private") == true)
                group.Private = arena.Private;

            if (ShouldShow("RegistrationCount") == true)
                group.RegistrationCount = arena.RegistrationCount;

            if (ShouldShow("Schedule") == true)
                group.Schedule = arena.Schedule;

            if (ShouldShow("TargetLocationID") == true)
                group.TargetLocationID = arena.TargetLocationID;

            if (ShouldShow("Topic") == true)
                group.Topic = lMapper.FromArena(arena.Topic);

            if (ShouldShow("ClusterTypeID") == true)
                group.ClusterTypeID = arena.ClusterTypeID;

            if (ShouldShow("GroupUrl") == true)
                group.GroupUrl = arena.GroupUrl;

            return group;
        }
Example #6
0
        public SmallGroup FromArena(Group arena)
        {
            SmallGroup   group   = new SmallGroup();
            LookupMapper lMapper = new LookupMapper();


            if (ShouldShow("GroupID") == true)
            {
                group.GroupID = arena.GroupID;
            }

            if (ShouldShow("Active") == true)
            {
                group.Active = arena.Active;
            }

            if (ShouldShow("AreaID") == true)
            {
                group.AreaID = arena.AreaID;
            }

            if (ShouldShow("AverageAge") == true)
            {
                group.AverageAge = arena.AverageAge;
            }

            if (ShouldShow("CategoryID") == true)
            {
                group.CategoryID = arena.ClusterType.CategoryID;
            }

            if (ShouldShow("GroupClusterID") == true)
            {
                group.GroupClusterID = arena.GroupClusterID;
            }

            if (ShouldShow("CreatedBy") == true)
            {
                group.CreatedBy = arena.CreatedBy;
            }

            if (ShouldShow("DateCreated") == true)
            {
                group.DateCreated = arena.DateCreated;
            }

            if (ShouldShow("DateModified") == true)
            {
                group.DateModified = arena.DateModified;
            }

            if (ShouldShow("Description") == true)
            {
                group.Description = arena.Description;
            }

            if (ShouldShow("Distance") == true)
            {
                group.Distance = arena.Distance;
            }

            if (ShouldShow("Leader") == true)
            {
                group.Leader = new GenericReference(arena.Leader);
            }

            if (ShouldShow("ClusterLevelID") == true)
            {
                group.ClusterLevelID = arena.ClusterLevelID;
            }

            if (ShouldShow("MaxMembers") == true)
            {
                group.MaxMembers = arena.MaxMembers;
            }

            if (ShouldShow("MeetingDay") == true)
            {
                group.MeetingDay = lMapper.FromArena(arena.MeetingDay);
            }

            if (ShouldShow("MemberCount") == true)
            {
                group.MemberCount = arena.Members.Count;
            }

            if (ShouldShow("Modifiedby") == true)
            {
                group.ModifiedBy = arena.ModifiedBy;
            }

            if (ShouldShow("Name") == true)
            {
                group.Name = arena.Name;
            }

            if (ShouldShow("NavigationUrl") == true)
            {
                group.NavigationUrl = arena.NavigationUrl;
            }

            if (ShouldShow("Notes") == true)
            {
                group.Notes = arena.Notes;
            }

            if (ShouldShow("PictureUrl") == true)
            {
                if (arena.ImageBlob != null && arena.ImageBlob.BlobID > 0)
                {
                    group.PictureUrl = getImageThumbnailUrl(arena.ImageBlob);
                }
            }

            if (ShouldShow("PrimaryAge") == true)
            {
                group.PrimaryAge = lMapper.FromArena(arena.PrimaryAge);
            }

            if (ShouldShow("PrimaryMaritalStatus") == true)
            {
                group.PrimaryMaritalStatus = lMapper.FromArena(arena.PrimaryMaritalStatus);
            }

            if (ShouldShow("Private") == true)
            {
                group.Private = arena.Private;
            }

            if (ShouldShow("RegistrationCount") == true)
            {
                group.RegistrationCount = arena.RegistrationCount;
            }

            if (ShouldShow("Schedule") == true)
            {
                group.Schedule = arena.Schedule;
            }

            if (ShouldShow("TargetLocationID") == true)
            {
                group.TargetLocationID = arena.TargetLocationID;
            }

            if (ShouldShow("Topic") == true)
            {
                group.Topic = lMapper.FromArena(arena.Topic);
            }

            if (ShouldShow("ClusterTypeID") == true)
            {
                group.ClusterTypeID = arena.ClusterTypeID;
            }

            if (ShouldShow("GroupUrl") == true)
            {
                group.GroupUrl = arena.GroupUrl;
            }

            return(group);
        }