/// ----------------------------------------------------------------------------- 
 /// <summary> 
 /// adds an object to the database 
 /// </summary> 
 /// <remarks> 
 /// </remarks> 
 /// <param name="objListPages">The ListPagesInfo object</param> 
 /// <history> 
 /// </history> 
 /// ----------------------------------------------------------------------------- 
 public void AddListPages(PagesList objListPages)
 {
     if (objListPages.Title.Trim() != "")
     {
         DataProvider.Instance().AddListPages(objListPages.ModuleId, objListPages.Title, objListPages.CreatedByUser);
     }
 }
        /// ----------------------------------------------------------------------------- 
        /// <summary> 
        /// cmdUpdate_Click runs when the update button is clicked 
        /// </summary> 
        /// <remarks> 
        /// </remarks> 
        /// <history> 
        /// </history> 
        /// ----------------------------------------------------------------------------- 
        protected void cmdUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                ListPagesController objListPagess = new ListPagesController();

                PagesList objListPages = new PagesList();

                objListPages.ModuleId = ModuleId;
                objListPages.PageListId = ItemId;
                objListPages.Title = txtContent.Text;
                objListPages.CreatedByUser = this.UserId;

                if (Null.IsNull(ItemId))
                {
                    // add the content within the ListPages table
                    objListPagess.AddListPages(objListPages);
                }
                else
                {
                    // update the content within the ListPages table
                    objListPagess.UpdateListPages(objListPages);
                }

                // Redirect back to the portal home page
                Response.Redirect(Globals.NavigateURL(), true);
            }
            catch (Exception exc)
            {
                //Module failed to load
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
 /// ----------------------------------------------------------------------------- 
 /// <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 xmlListPagess = Globals.GetContent(Content, "ListPagess");
     foreach (XmlNode xmlListPages in xmlListPagess.SelectNodes("ListPages"))
     {
         PagesList objListPages = new PagesList();
         objListPages.ModuleId = ModuleID;
         objListPages.Title = xmlListPages.SelectSingleNode("content").InnerText;
         objListPages.CreatedByUser = UserId;
         AddListPages(objListPages);
     }
 }