コード例 #1
0
ファイル: Role.cs プロジェクト: Confirmit/Portal
        /// <summary>
        /// Updates information about role.
        /// </summary>
        /// <param name="id">Role ID.</param>
        /// <param name="roleID">Role string ID.</param>
        /// <param name="name">Role name.</param>
        /// <param name="description">Role description.</param>
        /// <returns>If record was updated.</returns>
        public static bool UpdateRole( int id, string roleID, MLText name, MLText description )
        {
            RoleDetails details = new RoleDetails();
            details.ID = id;
            details.RoleID = roleID;
            details.Name = name.ToXMLString();
            details.Description = description.ToXMLString();

            return SiteProvider.Roles.UpdateRole( details );
        }
コード例 #2
0
ファイル: Role.cs プロジェクト: Confirmit/Portal
        /// <summary>
        /// Returns role from role details.
        /// </summary>
        /// <param name="details">Role details.</param>
        /// <returns>Role.</returns>
        public static Role GetRoleFromDetails( RoleDetails details )
        {
            Role role = new Role();
            role.m_ID = details.ID;
            role.m_RoleID = details.RoleID;
            role.m_Name = new MLText();
            role.m_Name.LoadFromXML( details.Name );
            role.m_Description = new MLText();
            role.m_Description.LoadFromXML( details.Description );

            return role;
        }
コード例 #3
0
ファイル: RolesProvider.cs プロジェクト: Confirmit/Portal
 /// <summary>
 /// Creates new role.
 /// </summary>
 /// <param name="role">Role.</param>
 /// <returns>ID of new role.</returns>
 public abstract int CreateRole( RoleDetails role );
コード例 #4
0
ファイル: Role.cs プロジェクト: Confirmit/Portal
        /// <summary>
        /// Updates information about role.
        /// </summary>
        /// <param name="roleID">Role string ID.</param>
        /// <param name="name">Role name.</param>
        /// <param name="description">Role description.</param>
        /// <returns>If record was created.</returns>
        public static int CreateRole( string roleID, MLText name, MLText description )
        {
            RoleDetails details = new RoleDetails();
            details.RoleID = roleID;
            details.Name = name.ToXMLString();
            details.Description = description.ToXMLString();

            return SiteProvider.Roles.CreateRole( details );
        }
コード例 #5
0
ファイル: RolesProvider.cs プロジェクト: Confirmit/Portal
 /// <summary>
 /// Updates new role.
 /// </summary>
 /// <param name="role">Role.</param>
 /// <returns>True if role was successfully updated; false, otherwise.</returns>
 public abstract bool UpdateRole( RoleDetails role );