Beispiel #1
0
        protected override void PostUpdateInsideTransaction(BusinessContext context)
        {
            base.PostUpdateInsideTransaction(context);

            // Principal
            if (context.Request.Target.Properties.Contains(DirectorySecureRoleEntity.FieldName))
            {
                DirectoryManager.UpdatePrincipal(context.GetTargetPrimaryKeyId().Value,
                                                 (string)context.Request.Target[DirectorySecureRoleEntity.FieldName]);
            }
        }
        protected override void PostUpdateInsideTransaction(BusinessContext context)
        {
            base.PostUpdateInsideTransaction(context);

            // Principal
            if (context.Request.Target.Properties.Contains(DirectoryOrganizationalUnitEntity.FieldName))
            {
                DirectoryOrganizationalUnitEntity entity = (DirectoryOrganizationalUnitEntity)BusinessManager.Load(DirectoryOrganizationalUnitEntity.ClassName, context.GetTargetPrimaryKeyId().Value);

                DirectoryManager.UpdatePrincipal(context.GetTargetPrimaryKeyId().Value,
                                                 (string)context.Request.Target[DirectoryOrganizationalUnitEntity.FieldName]);

                DirectoryManager.UpdatePrincipal((PrimaryKeyId)entity.OrganizationalUnitScopeId,
                                                 (string)context.Request.Target[DirectoryOrganizationalUnitEntity.FieldName]);
            }
        }