/// ----------------------------------------------------------------------------- /// <summary> /// adds an object to the database /// </summary> /// <remarks> /// </remarks> /// <param name="objATI_Preview">The ATI_PreviewInfo object</param> /// <history> /// </history> /// ----------------------------------------------------------------------------- public void AddATI_Preview(ATI_PreviewInfo objATI_Preview) { if (objATI_Preview.Content.Trim() != "") { DataProvider.Instance().AddATI_Preview(objATI_Preview.ModuleId, objATI_Preview.Content, objATI_Preview.CreatedByUser); } }
/// ----------------------------------------------------------------------------- /// <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 xmlATI_Previews = Globals.GetContent(Content, "ATI_Previews"); foreach (XmlNode xmlATI_Preview in xmlATI_Previews.SelectNodes("ATI_Preview")) { ATI_PreviewInfo objATI_Preview = new ATI_PreviewInfo(); objATI_Preview.ModuleId = ModuleID; objATI_Preview.Content = xmlATI_Preview.SelectSingleNode("content").InnerText; objATI_Preview.CreatedByUser = UserId; AddATI_Preview(objATI_Preview); } }