Example #1
0
            /// <summary>
            /// Called after the save operation has been executed
            /// </summary>
            /// <remarks>
            /// This method is only called if <see cref="M:Rock.Data.EntitySaveHook`1.PreSave" /> returns
            /// without error.
            /// </remarks>
            protected override void PostSave()
            {
                var rockContext = ( RockContext )this.RockContext;

                if (HistoryChangeList?.Any() == true)
                {
                    HistoryService.SaveChanges(rockContext, typeof(Group), Rock.SystemGuid.Category.HISTORY_GROUP_CHANGES.AsGuid(), Entity.Id, HistoryChangeList, Entity.Name, null, null, true, Entity.ModifiedByPersonAliasId, rockContext.SourceOfChange);
                }

                if (_FamilyCampusIsChanged)
                {
                    PersonService.UpdatePrimaryFamilyByGroup(Entity.Id, rockContext);
                }

                base.PostSave();
            }