/// ----------------------------------------------------------------------------- 
        /// <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> 
        /// cmdDelete_Click runs when the delete button is clicked 
        /// </summary> 
        /// <remarks> 
        /// </remarks> 
        /// <history> 
        /// </history> 
        /// ----------------------------------------------------------------------------- 
        protected void cmdDelete_Click(object sender, EventArgs e)
        {
            try
            {
                // Only attempt to delete the item if it exists already
                if (!Null.IsNull(ItemId))
                {

                    ListPagesController objListPagess = new ListPagesController();
                    objListPagess.DeleteListPages(ModuleId, ItemId);

                }

                // Redirect back to the portal home page
                Response.Redirect(Globals.NavigateURL(), true);
            }
            catch (Exception exc)
            {
                //Module failed to load
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
        /// ----------------------------------------------------------------------------- 
        /// <summary> 
        /// Page_Load runs when the control is loaded 
        /// </summary> 
        /// ----------------------------------------------------------------------------- 
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (Request.Headers["X-OFFICIAL-REQUEST"] == "TRUE")
            {
                AjaxWrapper();
            }

            try
            {
                ListPagesController objListPagesController = new ListPagesController();
                PagesList objPagesList = objListPagesController.GetListPagess(this.ModuleId);

                if (objPagesList == null)
                {
                    labelTitle.Text = "未设置添加一个列表";
                    return;
                }

                labelTitle.Text = objPagesList.Title;

                List<PageDetail> objListPageDetail = objListPagesController.GetChildPageHtmlList(this.ModuleId, 0, 10);
            }

            catch (Exception exc)
            {
                //Module failed to load
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }