Beispiel #1
0
        public string UpgradeModule(string version)
        {
            try
            {
                switch (version)
                {
                case "07.01.00":
                    ModuleDefinitionInfo mDef = ModuleDefinitionController.GetModuleDefinitionByFriendlyName("Digital Asset Management");

                    // Add tab to Admin Menu
                    if (mDef != null)
                    {
                        var hostPage = Upgrade.AddHostPage(
                            "File Management",
                            "Manage assets.",
                            "~/Icons/Sigma/Files_16X16_Standard.png",
                            "~/Icons/Sigma/Files_32X32_Standard.png",
                            true);

                        // Add module to page
                        Upgrade.AddModuleToPage(hostPage, mDef.ModuleDefID, "File Management", "~/Icons/Sigma/Files_32X32_Standard.png", true);

                        Upgrade.AddAdminPages(
                            "File Management",
                            "Manage assets within the portal",
                            "~/Icons/Sigma/Files_16X16_Standard.png",
                            "~/Icons/Sigma/Files_32X32_Standard.png",
                            true,
                            mDef.ModuleDefID,
                            "File Management",
                            "~/Icons/Sigma/Files_16X16_Standard.png",
                            true);
                    }

                    // Remove Host File Manager page
                    Upgrade.RemoveHostPage("File Manager");

                    // Remove Admin File Manager Pages
                    Upgrade.RemoveAdminPages("//Admin//FileManager");

                    break;
                }

                return("Success");
            }
            catch (Exception)
            {
                return("Failed");
            }
        }
        public string UpgradeModule(string Version)
        {
            try
            {
                switch (Version)
                {
                case "01.00.00":
                    ModuleDefinitionInfo moduleDefinition = ModuleDefinitionController.GetModuleDefinitionByFriendlyName("Taxonomy Manager");

                    if (moduleDefinition != null)
                    {
                        //Add Module to Admin Page for all Portals
                        Upgrade.AddAdminPages("Taxonomy",
                                              "Manage the Taxonomy for your Site",
                                              "~/images/icon_tag_16px.gif",
                                              "~/images/icon_tag_32px.gif",
                                              true,
                                              moduleDefinition.ModuleDefID,
                                              "Taxonomy Manager",
                                              "~/images/icon_tag_32px.gif",
                                              true);
                    }
                    break;

                case "06.00.00":
                    DesktopModuleInfo desktopModule = DesktopModuleController.GetDesktopModuleByModuleName("DotNetNuke.Taxonomy", Null.NullInteger);
                    desktopModule.Category = "Admin";
                    DesktopModuleController.SaveDesktopModule(desktopModule, false, false);
                    break;
                }
                return("Success");
            }
            catch (Exception exc)
            {
                Logger.Error(exc);

                return("Failed");
            }
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="version"></param>
        /// <returns></returns>
        public string UpgradeModule(string version)
        {
            try
            {
                switch (version)
                {
                case "08.00.00":
                    ModuleDefinitionInfo moduleDefinition = ModuleDefinitionController.GetModuleDefinitionByFriendlyName("Vendors");
                    if (moduleDefinition != null)
                    {
                        var hostPage = Upgrade.AddHostPage("Vendors",
                                                           "Manage vendor accounts, banner advertising and affiliate referrals within the portal.",
                                                           "~/Icons/Sigma/Vendors_16X16_Standard.png",
                                                           "~/Icons/Sigma/Vendors_32X32_Standard.png",
                                                           true);

                        //Add module to page
                        Upgrade.AddModuleToPage(hostPage, moduleDefinition.ModuleDefID, "Vendors", "~/Icons/Sigma/Vendors_32X32_Standard.png", true);

                        //Add Module to Admin Page for all Portals
                        Upgrade.AddAdminPages("Vendors",
                                              "Manage vendor accounts, banner advertising and affiliate referrals within the portal.",
                                              "~/Icons/Sigma/Vendors_16X16_Standard.png",
                                              "~/Icons/Sigma/Vendors_32X32_Standard.png",
                                              true,
                                              moduleDefinition.ModuleDefID,
                                              "Vendors",
                                              "~/Icons/Sigma/Vendors_32X32_Standard.png",
                                              true);
                    }
                    break;
                }
                return("Success");
            }
            catch (Exception)
            {
                return("Failed");
            }
        }