Ejemplo n.º 1
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// ImportModule implements the IPortable ImportModule Interface
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <param name="ModuleID">The Id of the module to be imported</param>
        /// <param name="Content">The content to be imported</param>
        /// <param name="Version">The version of the module to be imported</param>
        /// <param name="UserId">The Id of the user performing the import</param>
        /// <history>
        /// </history>
        /// -----------------------------------------------------------------------------
        public void ImportModule(int ModuleID, string Content, string Version, int UserId)
        {
            XmlNode xmlSF_UserProfiles = Globals.GetContent(Content, "SF_UserProfiles");

            foreach (XmlNode xmlSF_UserProfile in xmlSF_UserProfiles.SelectNodes("SF_UserProfile"))
            {
                SF_UserProfileInfo objSF_UserProfile = new SF_UserProfileInfo();

                objSF_UserProfile.ModuleId      = ModuleID;
                objSF_UserProfile.Content       = xmlSF_UserProfile.SelectSingleNode("content").InnerText;
                objSF_UserProfile.CreatedByUser = UserId;
                AddSF_UserProfile(objSF_UserProfile);
            }
        }