示例#1
0
        public void Save( Rock.Models.Cms.User User, int? personId )
        {
            List<Rock.Models.Core.EntityChange> entityChanges = _repository.Save( User, personId );

            if ( entityChanges != null )
            {
                Rock.Services.Core.EntityChangeService entityChangeService = new Rock.Services.Core.EntityChangeService();

                foreach ( Rock.Models.Core.EntityChange entityChange in entityChanges )
                {
                    entityChange.EntityId = User.Id;
                    entityChangeService.AddEntityChange ( entityChange );
                    entityChangeService.Save( entityChange, personId );
                }
            }
        }
        public void Save( Rock.Models.Core.AttributeValue AttributeValue, int? personId )
        {
            List<Rock.Models.Core.EntityChange> entityChanges = _repository.Save( AttributeValue, personId );

            if ( entityChanges != null )
            {
                Rock.Services.Core.EntityChangeService entityChangeService = new Rock.Services.Core.EntityChangeService();

                foreach ( Rock.Models.Core.EntityChange entityChange in entityChanges )
                {
                    entityChange.EntityId = AttributeValue.Id;
                    entityChangeService.AddEntityChange ( entityChange );
                    entityChangeService.Save( entityChange, personId );
                }
            }
        }