/// ----------------------------------------------------------------------------- /// <summary> /// adds an object to the database /// </summary> /// <remarks> /// </remarks> /// <param name="objATI_Viral">The ATI_ViralInfo object</param> /// <history> /// </history> /// ----------------------------------------------------------------------------- public void AddATI_Viral(ATI_ViralInfo objATI_Viral) { if (objATI_Viral.Content.Trim() != "") { DataProvider.Instance().AddATI_Viral(objATI_Viral.ModuleId, objATI_Viral.Content, objATI_Viral.CreatedByUser); } }
/// ----------------------------------------------------------------------------- /// <summary> /// adds an object to the database /// </summary> /// <remarks> /// </remarks> /// <param name="objATI_Viral">The ATI_ViralInfo object</param> /// <history> /// </history> /// ----------------------------------------------------------------------------- public void AddATI_Viral(ATI_ViralInfo objATI_Viral) { if (objATI_Viral.Content.Trim() != "") { DataProvider.Instance().AddATI_Viral(objATI_Viral.ModuleId, objATI_Viral.Content, objATI_Viral.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_Virals = Globals.GetContent(Content, "ATI_Virals"); foreach (XmlNode xmlATI_Viral in xmlATI_Virals.SelectNodes("ATI_Viral")) { ATI_ViralInfo objATI_Viral = new ATI_ViralInfo(); objATI_Viral.ModuleId = ModuleID; objATI_Viral.Content = xmlATI_Viral.SelectSingleNode("content").InnerText; objATI_Viral.CreatedByUser = UserId; AddATI_Viral(objATI_Viral); } }
/// ----------------------------------------------------------------------------- /// <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_Virals = Globals.GetContent(Content, "ATI_Virals"); foreach (XmlNode xmlATI_Viral in xmlATI_Virals.SelectNodes("ATI_Viral")) { ATI_ViralInfo objATI_Viral = new ATI_ViralInfo(); objATI_Viral.ModuleId = ModuleID; objATI_Viral.Content = xmlATI_Viral.SelectSingleNode("content").InnerText; objATI_Viral.CreatedByUser = UserId; AddATI_Viral(objATI_Viral); } }