/// ----------------------------------------------------------------------------- /// <summary> /// adds an object to the database /// </summary> /// <remarks> /// </remarks> /// <param name="objATI_RecipeProfile">The ATI_RecipeProfileInfo object</param> /// <history> /// </history> /// ----------------------------------------------------------------------------- public void AddATI_RecipeProfile(ATI_RecipeProfileInfo objATI_RecipeProfile) { if (objATI_RecipeProfile.Content.Trim() != "") { DataProvider.Instance().AddATI_RecipeProfile(objATI_RecipeProfile.ModuleId, objATI_RecipeProfile.Content, objATI_RecipeProfile.CreatedByUser); } }
/// ----------------------------------------------------------------------------- /// <summary> /// adds an object to the database /// </summary> /// <remarks> /// </remarks> /// <param name="objATI_RecipeProfile">The ATI_RecipeProfileInfo object</param> /// <history> /// </history> /// ----------------------------------------------------------------------------- public void AddATI_RecipeProfile(ATI_RecipeProfileInfo objATI_RecipeProfile) { if (objATI_RecipeProfile.Content.Trim() != "") { DataProvider.Instance().AddATI_RecipeProfile(objATI_RecipeProfile.ModuleId, objATI_RecipeProfile.Content, objATI_RecipeProfile.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_RecipeProfiles = Globals.GetContent(Content, "ATI_RecipeProfiles"); foreach (XmlNode xmlATI_RecipeProfile in xmlATI_RecipeProfiles.SelectNodes("ATI_RecipeProfile")) { ATI_RecipeProfileInfo objATI_RecipeProfile = new ATI_RecipeProfileInfo(); objATI_RecipeProfile.ModuleId = ModuleID; objATI_RecipeProfile.Content = xmlATI_RecipeProfile.SelectSingleNode("content").InnerText; objATI_RecipeProfile.CreatedByUser = UserId; AddATI_RecipeProfile(objATI_RecipeProfile); } }
/// ----------------------------------------------------------------------------- /// <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_RecipeProfiles = Globals.GetContent(Content, "ATI_RecipeProfiles"); foreach (XmlNode xmlATI_RecipeProfile in xmlATI_RecipeProfiles.SelectNodes("ATI_RecipeProfile")) { ATI_RecipeProfileInfo objATI_RecipeProfile = new ATI_RecipeProfileInfo(); objATI_RecipeProfile.ModuleId = ModuleID; objATI_RecipeProfile.Content = xmlATI_RecipeProfile.SelectSingleNode("content").InnerText; objATI_RecipeProfile.CreatedByUser = UserId; AddATI_RecipeProfile(objATI_RecipeProfile); } }