/// <summary>
        ///   Implements the enhanced Import Interface for DotNetNuke
        /// </summary>
        public void ImportModule(int moduleId, int tabId, string content, string version, int userId, bool isInstance)
        {
            // save script timeout
            var scriptTimeOut = HttpContext.Current.Server.ScriptTimeout;

            try
            {
                // temporarily set script timeout to large value ( this value is only applicable when application is not running in Debug mode )
                HttpContext.Current.Server.ScriptTimeout = int.MaxValue;

                var udtController = new UserDefinedTableController(moduleId);
                using (var ds = new DataSet())
                {
                    var xmlNode = Globals.GetContent(content, string.Empty);
                    ds.ReadXml(new XmlNodeReader(xmlNode));
                    var modules     = new ModuleController();
                    var tabModuleId = Null.NullInteger;
                    if (tabId != Null.NullInteger)
                    {
                        var moduleInfo = modules.GetModule(moduleId, tabId);
                        tabModuleId = moduleInfo.TabModuleID;
                    }
                    if (tabModuleId != Null.NullInteger && ds.Tables[DataSetTableName.TabSettings] != null)
                    {
                        AddTabModuleSettings(modules, tabModuleId, ds);
                    }
                    if (!isInstance)
                    {
                        AddModuleSettings(moduleId, modules, ds);
                        //Fields - first delete old Fields
                        udtController.ResetModule();
                        AddFields(moduleId, ds);
                        AddData(udtController, ds);
                    }
                    if (ds.Tables.Contains(DataSetTableName.Stylesheets))
                    {
                        ImportStyleSheet(moduleId, isInstance, tabModuleId, modules, ds);
                    }
                }
            }
            finally
            {
                // reset script timeout
                HttpContext.Current.Server.ScriptTimeout = scriptTimeOut;
            }
        }