/// <summary> /// ModuleAction_Click handles all ModuleAction events raised from the skin /// </summary> /// <remarks> /// </remarks> /// <param name="sender"> The object that triggers the event</param> /// <param name="e">An ActionEventArgs object</param> /// <history> /// [cnurse] 03/01/2006 Created /// </history> private void ModuleAction_Click( object sender, ActionEventArgs e ) { switch( e.Action.CommandArgument ) { case "ManageRoles": pnlRoles.Visible = true; pnlUser.Visible = false; break; case "Cancel": break; //OnCancelAction() case "Delete": break; //OnDeleteAction() case "Edit": break; //OnEditAction() case "Save": break; //OnSaveAction() default: break; //OnModuleAction(e.Action.CommandArgument) } }
/// ----------------------------------------------------------------------------- /// <summary> /// ModuleAction_Click handles all ModuleAction events raised from the skin /// </summary> /// <remarks> /// </remarks> /// <param name="sender"> The object that triggers the event</param> /// <param name="e">An ActionEventArgs object</param> /// <history> /// [cnurse] 11/17/2006 Created /// </history> /// ----------------------------------------------------------------------------- private void ModuleAction_Click( object sender, ActionEventArgs e ) { switch( e.Action.CommandArgument ) { case "Delete": DeleteExpiredPortals(); break; } }
/// ----------------------------------------------------------------------------- /// <summary> /// OnAction raises the Action Event /// </summary> /// <history> /// [cnurse] 12/23/2007 created /// </history> /// ----------------------------------------------------------------------------- protected virtual void OnAction(ActionEventArgs e) { if (Action != null) { Action(this, e); } }
/// ----------------------------------------------------------------------------- /// <summary> /// ActionButtonClick handles the Action event of the contained ActionCommandButton(s) /// </summary> /// <history> /// [cnurse] 12/23/2007 created /// </history> /// ----------------------------------------------------------------------------- private void ActionButtonClick(object sender, ActionEventArgs e) { OnAction(e); }
/// ----------------------------------------------------------------------------- /// <summary> /// ModuleAction_Click handles all ModuleAction events raised from the action menu /// </summary> /// <remarks> /// </remarks> /// <history> /// </history> /// ----------------------------------------------------------------------------- private void ModuleAction_Click(object sender, ActionEventArgs e) { try { if (e.Action.CommandArgument == "publish") { // verify security if (IsEditable && PortalSettings.UserMode == PortalSettings.Mode.Edit) { // get content var objHTML = new HtmlTextController(); HtmlTextInfo objContent = objHTML.GetTopHtmlText(ModuleId, false, WorkflowID); var objWorkflow = new WorkflowStateController(); if (objContent.StateID == objWorkflow.GetFirstWorkflowStateID(WorkflowID)) { // publish content objContent.StateID = objWorkflow.GetNextWorkflowStateID(objContent.WorkflowID, objContent.StateID); // save the content objHTML.UpdateHtmlText(objContent, objHTML.GetMaximumVersionHistory(PortalId)); // refresh page Response.Redirect(Globals.NavigateURL(), true); } } } } catch (Exception exc) { Exceptions.ProcessModuleLoadException(this, exc); } }
protected void OnModuleActionClick(object sender, ActionEventArgs e) { switch (e.Action.CommandArgument) { case "Delete": try { var objVendors = new VendorController(); if (Globals.IsHostTab(PortalSettings.ActiveTab.TabID)) { objVendors.DeleteVendors(); } else { objVendors.DeleteVendors(PortalId); } Response.Redirect(Globals.NavigateURL(), true); } catch (Exception exc) //Module failed to load { Exceptions.ProcessModuleLoadException(this, exc); } break; } }
/// ----------------------------------------------------------------------------- /// <summary> /// Action_Click responds to an Action Event in the contained actionButtonList /// </summary> /// <history> /// [cnurse] 12/23/2007 created /// </history> /// ----------------------------------------------------------------------------- private void Action_Click(object sender, ActionEventArgs e) { ProcessAction(e.Action.ID.ToString()); }
/// ----------------------------------------------------------------------------- /// <summary> /// ModuleAction_Click runs when a ModuleAction is clicked. /// </summary> /// <remarks>The Module Action must be configured to fire an event (it may be configured /// to redirect to a new url). The event handler finds the Parent Container and invokes each /// registered ModuleActionEventListener delegate. /// /// Note: with the refactoring of this to the Container, this could be handled at the container level. /// However, for legacy purposes this is left this way, as many moodules would have registered their /// listeners on the Container directly, rather than through the helper method in PortalModuleBase.</remarks> /// <history> /// [cnurse] 07/04/2005 Documented /// [cnurse] 12/05/2007 Moved from Container.vb /// </history> /// ----------------------------------------------------------------------------- private void ModuleActionClick(object sender, ActionEventArgs e) { //Search through the listeners foreach (ModuleActionEventListener listener in ParentSkin.ActionEventListeners) { //If the associated module has registered a listener if (e.ModuleConfiguration.ModuleID == listener.ModuleID) { //Invoke the listener to handle the ModuleAction_Click event listener.ActionEvent.Invoke(sender, e); } } }
/// ----------------------------------------------------------------------------- /// <summary> /// ModuleAction_Click handles all ModuleAction events raised from the skin /// </summary> /// <remarks> /// </remarks> /// <param name="sender"> The object that triggers the event</param> /// <param name="e">An ActionEventArgs object</param> /// <history> /// [cnurse] 03/02/2006 Created /// </history> /// ----------------------------------------------------------------------------- private void ModuleAction_Click(object sender, ActionEventArgs e) { switch (e.Action.CommandArgument) { case "Delete": DeleteUnAuthorizedUsers(); break; case "Remove": RemoveDeletedUsers(); break; } }