/// ----------------------------------------------------------------------------- /// <summary> /// Allows for DNNNode object to be easily obtained based off of passed in ID /// </summary> /// <param name="strID">NodeID to retrieve</param> /// <param name="strNamespace">Namespace for node collection (usually control's ClientID)</param> /// <returns>DNNNode</returns> /// <remarks> /// Primary purpose of this is to obtain the DNNNode needed for the events exposed by the NavigationProvider /// </remarks> /// <history> /// [Jon Henning] 8/9/2005 Created /// </history> /// ----------------------------------------------------------------------------- public static DNNNode GetNavigationNode(string strID, string strNamespace) { //TODO: FIX THIS MESS! DNNNodeCollection objNodes = GetNavigationNodes(strNamespace); DNNNode objNode = objNodes.FindNode(strID); var objReturnNodes = new DNNNodeCollection(strNamespace); objReturnNodes.Import(objNode); objReturnNodes[0].ID = strID; return objReturnNodes[0]; }
/// ----------------------------------------------------------------------------- /// <summary> /// Allows for DNNNode object to be easily obtained based off of passed in ID /// </summary> /// <param name="strID">NodeID to retrieve</param> /// <param name="strNamespace">Namespace for node collection (usually control's ClientID)</param> /// <param name="objActionRoot">Root Action object used in searching</param> /// <param name="objControl">ActionControl to base actions off of</param> /// <returns>DNNNode</returns> /// <remarks> /// Primary purpose of this is to obtain the DNNNode needed for the events exposed by the NavigationProvider /// </remarks> /// <history> /// [Jon Henning] 5/15/2006 Created /// </history> /// ----------------------------------------------------------------------------- public static DNNNode GetActionNode(string strID, string strNamespace, ModuleAction objActionRoot, Control objControl) { DNNNodeCollection objNodes = GetActionNodes(objActionRoot, objControl, -1); DNNNode objNode = objNodes.FindNode(strID); var objReturnNodes = new DNNNodeCollection(strNamespace); objReturnNodes.Import(objNode); objReturnNodes[0].ID = strID; return objReturnNodes[0]; }