/// <summary> /// Use the passed in path and append to it query string parameters for the passed in primary key values /// </summary> public string GetActionPath(string action, IList <object> primaryKeyValues, string path) { // If there is no path, use standard routing if (String.IsNullOrEmpty(path)) { return(GetActionPath(action, primaryKeyValues)); } // Get all the PK values in a dictionary var routeValues = new RouteValueDictionary(); GetRouteValuesFromPK(routeValues, primaryKeyValues); // Create a query string from it and Add it to the path return(QueryStringHandler.AddFiltersToPath(path, routeValues)); }
public string GetChildrenPath(string action, object row, string path) { // If there is no row, we can't get a path if (row == null) { return(String.Empty); } if (String.IsNullOrEmpty(path)) { return(GetChildrenPath(action, row)); } // Build a query string param with our primary key RouteValueDictionary routeValues = GetRouteValues(row); // Add it to the path return(QueryStringHandler.AddFiltersToPath(path, routeValues)); }