private static void UnassignPortals(DesktopModuleInfo desktopModule, IList <ListItemDto> portals)
 {
     foreach (var portal in portals)
     {
         DesktopModuleController.RemoveDesktopModuleFromPortal(portal.Id, desktopModule.DesktopModuleID, true);
     }
 }
        protected void ctlPortals_RemoveAllButtonClick(object sender, EventArgs e)
        {
            //Add all Portals
            foreach (PortalInfo objPortal in PortalController.Instance.GetPortals())
            {
                DesktopModuleController.RemoveDesktopModuleFromPortal(objPortal.PortalID, DesktopModule.DesktopModuleID, false);
            }
            DataCache.ClearHostCache(true);

            BindDesktopModule(false);
        }
        protected void OnRemoveAllModulesClick(object sender, EventArgs e)
        {
            //Remove all Modules
            foreach (DesktopModuleInfo desktopModule in DesktopModuleController.GetDesktopModules(Null.NullInteger).Values)
            {
                DesktopModuleController.RemoveDesktopModuleFromPortal(_portalId, desktopModule.DesktopModuleID, false);
            }
            DataCache.ClearPortalCache(_portalId, false);

            BindDesktopModules();
        }
        protected void ctlPortals_RemoveButtonClick(object sender, DualListBoxEventArgs e)
        {
            if (e.Items != null)
            {
                foreach (string portal in e.Items)
                {
                    DesktopModuleController.RemoveDesktopModuleFromPortal(int.Parse(portal), DesktopModule.DesktopModuleID, false);
                }
            }
            DataCache.ClearHostCache(true);

            BindDesktopModule(false);
        }
        protected void OnRemoveModuleClick(object sender, DualListBoxEventArgs e)
        {
            if (e.Items != null)
            {
                foreach (string desktopModule in e.Items)
                {
                    DesktopModuleController.RemoveDesktopModuleFromPortal(_portalId, int.Parse(desktopModule), false);
                }
            }
            DataCache.ClearPortalCache(_portalId, false);

            BindDesktopModules();
        }