Esempio n. 1
0
        /// <summary>
        /// Creates the principal.
        /// </summary>
        /// <param name="primaryKeyId">The primary key id.</param>
        /// <param name="name">The name.</param>
        internal static void CreatePrincipal(DirectoryPrincipalType principalType, PrimaryKeyId primaryKeyId, string name)
        {
            DirectoryPrincipalEntity principal = (DirectoryPrincipalEntity)BusinessManager.InitializeEntity(DirectoryPrincipalEntity.ClassName);

            principal["DirectoryPrincipalId"] = primaryKeyId;
            principal.Type = (int)principalType;
            principal.Name = name;

            BusinessManager.Create(principal);
        }
Esempio n. 2
0
        /// <summary>
        /// Creates the principal.
        /// </summary>
        /// <param name="primaryKeyId">The primary key id.</param>
        /// <param name="name">The name.</param>
        internal static void CreatePrincipal(DirectoryPrincipalType principalType, PrimaryKeyId primaryKeyId, string name)
        {
            DirectoryPrincipalEntity principal = (DirectoryPrincipalEntity)BusinessManager.InitializeEntity(DirectoryPrincipalEntity.ClassName);

            principal["DirectoryPrincipalId"] = primaryKeyId;
            principal.Type = (int)principalType;
            principal.Name = name;

            BusinessManager.Create(principal);
        }