/// <summary>
        /// Deletes a tab
        /// </summary>
        /// <param name="intTabid">TabId of the tab to be deleted</param>
        /// <remarks>
        /// Adds a log entry for the action to the EventLog
        /// </remarks>
        /// <history>
        /// 	[VMasanas]	18/08/2004	Created
        ///                 19/09/2004  Remove skin deassignment. BLL takes care of this.
        ///                 30/09/2004  Change logic so log is only added when tab is actually deleted
        ///                 28/02/2005  Remove modules when deleting pages
        /// </history>
        private void DeleteTab( int intTabid )
        {
            EventLogController objEventLog = new EventLogController();

            // delete tab
            TabController objTabs = new TabController();
            ModuleController objModules = new ModuleController();

            TabInfo objTab = objTabs.GetTab( intTabid );
            if( objTab != null )
            {
                //save tab modules before deleting page
                ArrayList arrTabModules = objModules.GetPortalTabModules( objTab.PortalID, objTab.TabID );

                // hard delete the tab
                objTabs.DeleteTab( objTab.TabID, objTab.PortalID );

                // check if it's deleted
                TabInfo objTabDeleted = objTabs.GetTab( intTabid );
                if( objTabDeleted == null )
                {
                    //delete modules that do not have other instances
                    foreach( ModuleInfo objmodule in arrTabModules )
                    {
                        // check if all modules instances have been deleted
                        ModuleInfo objDelModule = objModules.GetModule( objmodule.ModuleID, Null.NullInteger );
                        if( objDelModule == null || objDelModule.TabID == Null.NullInteger )
                        {
                            objModules.DeleteModule( objmodule.ModuleID );
                        }
                    }
                    objEventLog.AddLog( objTab, PortalSettings, UserId, "", EventLogController.EventLogType.TAB_DELETED );
                }
                else
                {
                    // should be a parent tab
                    UI.Skins.Skin.AddModuleMessage( this, string.Format( Localization.GetString( "ParentTab.ErrorMessage", this.LocalResourceFile ), objTab.TabName ), ModuleMessageType.YellowWarning );
                }
            }
        }