Beispiel #1
0
        /// <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 );
        }
Beispiel #2
0
        /// <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;
        }
Beispiel #3
0
 /// <summary>
 /// Creates new role.
 /// </summary>
 /// <param name="role">Role.</param>
 /// <returns>ID of new role.</returns>
 public abstract int CreateRole( RoleDetails role );
Beispiel #4
0
        /// <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 );
        }
Beispiel #5
0
 /// <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 );