Ich möchte "Query Value" zum BDC List WebPart von (Provider) businessdata Filter Webpart bereitstellen. Beim Versuch, eine Verbindung herzustellen, erhalte ich einen Fehler. "Der Provider-Verbindungspunkt (BusinessDataFilterWebPart) und der Consumer-Verbindungspunkt" BusinessDataListWebPart "verwenden nicht dieselbe Verbindungsschnittstelle."BDC-Webpart-Verbindung Schnittstellenfehler
Folgendes ist mein Code-Snippet.
System.Web.UI.WebControls.WebParts.WebPart providerWebPart =
webPartManager.WebParts[filterWebPart.ID];
ProviderConnectionPointCollection providerConnections =
webPartManager.GetProviderConnectionPoints(providerWebPart);
ProviderConnectionPoint providerConnection = null;
foreach (ProviderConnectionPoint ppoint in providerConnections)
{
if (ppoint.InterfaceType == typeof(ITransformableFilterValues))
providerConnection = ppoint;
}
System.Web.UI.WebControls.WebParts.WebPart consumerWebPart =
webPartManager.WebParts[consumer.ID];
ConsumerConnectionPointCollection consumerConnections =
webPartManager.GetConsumerConnectionPoints(consumerWebPart);
ConsumerConnectionPoint consumerConnection = null;
foreach (ConsumerConnectionPoint cpoint in consumerConnections)
{
if (cpoint.InterfaceType == typeof(IWebPartParameters))
consumerConnection = cpoint;
}
SPWebPartConnection newConnection = webPartManager.SPConnectWebParts(
providerWebPart, providerConnection, consumerWebPart, consumerConnection);