private void MoveUpDown( ModuleAction Command )
        {
            ModuleController objModules = new ModuleController();
            switch (Command.CommandName)
            {
                case ModuleActionType.MoveTop:

                    objModules.UpdateModuleOrder(PortalModule.TabId, PortalModule.ModuleConfiguration.ModuleID, 0, Command.CommandArgument);
                    break;
                case ModuleActionType.MoveUp:

                    objModules.UpdateModuleOrder(PortalModule.TabId, PortalModule.ModuleConfiguration.ModuleID, PortalModule.ModuleConfiguration.ModuleOrder - 3, Command.CommandArgument);
                    break;
                case ModuleActionType.MoveDown:

                    objModules.UpdateModuleOrder(PortalModule.TabId, PortalModule.ModuleConfiguration.ModuleID, PortalModule.ModuleConfiguration.ModuleOrder + 3, Command.CommandArgument);
                    break;
                case ModuleActionType.MoveBottom:

                    objModules.UpdateModuleOrder(PortalModule.TabId, PortalModule.ModuleConfiguration.ModuleID, (PortalModule.ModuleConfiguration.PaneModuleCount * 2) + 1, Command.CommandArgument);
                    break;
            }

            objModules.UpdateTabModuleOrder(PortalModule.TabId, PortalModule.PortalId);

            // Redirect to the same page to pick up changes
            Response.Redirect(Request.RawUrl, true);
        }
        private void MoveToPane( ModuleAction Command )
        {
            ModuleController objModules = new ModuleController();

            objModules.UpdateModuleOrder(PortalModule.TabId, PortalModule.ModuleConfiguration.ModuleID, -1, Command.CommandArgument);
            objModules.UpdateTabModuleOrder(PortalModule.TabId, PortalModule.PortalId);

            // Redirect to the same page to pick up changes
            Response.Redirect(Request.RawUrl, true);
        }
        public HttpResponseMessage MoveModule(MoveModuleDTO postData)
        {
            var moduleController = new ModuleController();

            moduleController.UpdateModuleOrder(postData.TabId, postData.ModuleId, postData.ModuleOrder, postData.Pane);
            moduleController.UpdateTabModuleOrder(postData.TabId);

            return Request.CreateResponse(HttpStatusCode.OK);
        }
Esempio n. 4
0
File: Pane.cs Progetto: biganth/Curt
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// ModuleMoveToPanePostBack excutes when a module is moved by Drag-and-Drop
        /// </summary>
        /// <param name="args">A ClientAPIPostBackEventArgs object</param>
        /// <history>
        /// 	[cnurse]	12/05/2007	Moved from Skin.vb
        /// </history>
        /// -----------------------------------------------------------------------------
        private void ModuleMoveToPanePostBack(ClientAPIPostBackEventArgs args)
        {
            var portalSettings = (PortalSettings)HttpContext.Current.Items["PortalSettings"];
            if (TabPermissionController.CanAdminPage())
            {
                var moduleId = Convert.ToInt32(args.EventArguments["moduleid"]);
                var paneName = Convert.ToString(args.EventArguments["pane"]);
                var moduleOrder = Convert.ToInt32(args.EventArguments["order"]);

                var moduleController = new ModuleController();
                moduleController.UpdateModuleOrder(portalSettings.ActiveTab.TabID, moduleId, moduleOrder, paneName);
                moduleController.UpdateTabModuleOrder(portalSettings.ActiveTab.TabID);

                //Redirect to the same page to pick up changes
                PaneControl.Page.Response.Redirect(PaneControl.Page.Request.RawUrl, true);
            }
        }
Esempio n. 5
0
        private void MoveToPane(ModuleAction Command)
        {
            var objModules = new ModuleController();

            objModules.UpdateModuleOrder(ModuleContext.TabId, ModuleContext.ModuleId, -1, Command.CommandArgument);
            objModules.UpdateTabModuleOrder(ModuleContext.TabId);

            //Redirect to the same page to pick up changes
            Response.Redirect(Request.RawUrl, true);
        }
Esempio n. 6
0
        private void ModuleMoveToPanePostBack( ClientAPIPostBackEventArgs args )
        {
            PortalSettings portalSettings = (PortalSettings)HttpContext.Current.Items["PortalSettings"];
//            if (PortalSecurity.IsInRole(portalSettings.AdministratorRoleName.ToString()) || PortalSecurity.IsInRoles(portalSettings.ActiveTab.AdministratorRoles.ToString()))
            {
                int intModuleID = Convert.ToInt32(args.EventArguments["moduleid"]);
                string strPaneName = args.EventArguments["pane"].ToString();
                int intOrder = Convert.ToInt32(args.EventArguments["order"]);
                ModuleController objModules = new ModuleController();

                objModules.UpdateModuleOrder(portalSettings.ActiveTab.TabID, intModuleID, intOrder, strPaneName);
                objModules.UpdateTabModuleOrder(portalSettings.ActiveTab.TabID, portalSettings.ActiveTab.PortalID);

                // Redirect to the same page to pick up changes
                Response.Redirect(Request.RawUrl, true);
            }
        }