(공급자) businessdata 필터 webpart에서 BDC 목록 WebPart에 "쿼리 값"을 제공하려고합니다. 연결하려고하면 오류가 발생합니다. "공급자 연결 지점 (BusinessDataFilterWebPart)과 소비자 연결 지점"BusinessDataListWebPart "는 동일한 연결 인터페이스를 사용하지 않습니다."BDC 웹 파트 연결 인터페이스 오류
다음은 제 코드입니다.
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);