Ejemplo n.º 1
0
 private void Control_NodeClick(NavigationEventArgs args)
 {
     if (args.Node == null)
     {
         args.Node = Navigation.GetNavigationNode(args.ID, Control.ID);
     }
     Response.Redirect(Globals.ApplicationURL(int.Parse(args.Node.Key)), true);
 }
Ejemplo n.º 2
0
 private void Control_PopulateOnDemand(NavigationEventArgs args)
 {
     if (args.Node == null)
     {
         args.Node = Navigation.GetNavigationNode(args.ID, Control.ID);
     }
     BuildNodes(args.Node);
 }
Ejemplo n.º 3
0
 private void DNNTree_PopulateOnDemand( NavigationEventArgs args ) //Handles DNNTree.PopulateOnDemand
 {
     if( args.Node == null )
     {
         args.Node = Navigation.GetNavigationNode( args.ID, Control.ID );
     }
     BuildTree( args.Node, true );
 }
Ejemplo n.º 4
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// ProviderControl_PopulateOnDemand handles the Populate On Demand Event
        /// </summary>
        /// <history>
        /// 	[cnurse]	12/24/2007  created
        /// </history>
        /// -----------------------------------------------------------------------------
        private void ProviderControl_PopulateOnDemand(NavigationEventArgs args)
        {
            SetMenuDefaults();
            ActionRoot.Actions.AddRange(ModuleControl.ModuleContext.Actions); //Modules how add custom actions in control lifecycle will not have those actions populated...

            ModuleAction objAction = ActionRoot;
            if (ActionRoot.ID != Convert.ToInt32(args.ID))
            {
                objAction = ModuleControl.ModuleContext.Actions.GetActionByID(Convert.ToInt32(args.ID));
            }
            if (args.Node == null)
            {
                args.Node = Navigation.GetActionNode(args.ID, ProviderControl.ID, objAction, this);
            }
            ProviderControl.ClearNodes(); //since we always bind we need to clear the nodes for providers that maintain their state
            BindMenu(Navigation.GetActionNodes(objAction, args.Node, this, ExpandDepth));
        }
Ejemplo n.º 5
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// MenuItem_Click handles the Menu Click event
 /// </summary>
 /// <history>
 /// 	[cnurse]	12/24/2007  created
 /// </history>
 /// -----------------------------------------------------------------------------
 private void MenuItem_Click(NavigationEventArgs args)
 {
     if (Regex.IsMatch(args.ID, "^\\d+$"))
     {
         ModuleAction action = ModuleControl.ModuleContext.Actions.GetActionByID(Convert.ToInt32(args.ID));
         if (!ActionManager.ProcessAction(action))
         {
             OnAction(new ActionEventArgs(action, ModuleControl.ModuleContext.Configuration));
         }
     }
 }
Ejemplo n.º 6
0
 protected void ctlActions_MenuClick( NavigationEventArgs args ) //Handles ctlActions.MenuClick
 {
     try
     {
         ProcessAction( args.ID );
     }
     catch( Exception exc ) //Module failed to load
     {
         Exceptions.ProcessModuleLoadException( this, exc );
     }
 }
Ejemplo n.º 7
0
		private void ActionClick(NavigationEventArgs args)
		{
			using (new DNNContext(this))
			{
				try
				{
					ProcessAction(args.ID);
				}
				catch (Exception exc)
				{
					Exceptions.ProcessModuleLoadException(this, exc);
				}
			}
		}