/// ----------------------------------------------------------------------------- 
 /// <summary> 
 /// adds an object to the database 
 /// </summary> 
 /// <remarks> 
 /// </remarks> 
 /// <param name="objDocumentsExchangeModule">The DocumentsExchangeModuleInfo object</param> 
 /// <history> 
 /// </history> 
 /// ----------------------------------------------------------------------------- 
 public void AddDocumentsExchangeModule(DocumentsExchangeModuleInfo objDocumentsExchangeModule)
 {
     if (objDocumentsExchangeModule.Content.Trim() != "")
     {
         DataProvider.Instance().AddDocumentsExchangeModule(objDocumentsExchangeModule.ModuleId, objDocumentsExchangeModule.Content, objDocumentsExchangeModule.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
            {
                DocumentsExchangeModuleController objDocumentsExchangeModules = new DocumentsExchangeModuleController();

                DocumentsExchangeModuleInfo objDocumentsExchangeModule = new DocumentsExchangeModuleInfo();

                objDocumentsExchangeModule.ModuleId = ModuleId;
                objDocumentsExchangeModule.ItemId = ItemId;
                objDocumentsExchangeModule.Content = txtContent.Text;
                objDocumentsExchangeModule.CreatedByUser = this.UserId;

                if (Null.IsNull(ItemId))
                {
                    // add the content within the DocumentsExchangeModule table
                    objDocumentsExchangeModules.AddDocumentsExchangeModule(objDocumentsExchangeModule);
                }
                else
                {
                    // update the content within the DocumentsExchangeModule table
                    objDocumentsExchangeModules.UpdateDocumentsExchangeModule(objDocumentsExchangeModule);
                }

                // Redirect back to the portal home page
                Response.Redirect(Globals.NavigateURL(), true);
            }
            catch (Exception exc)
            {
                //Module failed to load
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }