0

我在一个项目中有三个项目,一个是数据库层,第二个是 WCF,第三个是使用这两个项目的主站点,所以我在调试时出错

Error   203 'CIService.CIServiceClient' does not contain a definition for 'GetInventoryProjectDetailCompleted' and no extension method 'GetInventoryProjectDetailCompleted' accepting a first argument of type 'CIService.CIServiceClient' could be found (are you missing a using directive or an assembly reference?) G:\Design Scoring\InspectionEvaluation\ProjectDetails.aspx.cs   30  27  G:\Design Scoring\InspectionEvaluation\

在以下代码行中,

CIService.CIServiceClient svcClient = new CIService.CIServiceClient();
                svcClient.GetInventoryProjectDetailCompleted += new EventHandler<CIService.GetInventoryProjectDetailCompletedEventArgs>(svcClient_GetInventoryProjectDetailCompleted);
                svcClient.GetInventoryProjectDetailAsync(consultantId, projectId);

此代码来自使用 WCF 服务方法“GetInventoryProjectDetailCompleted”的主站点,我在主站点中也添加了 WCF 参考,在网上检查它我得到了在 web.config 文件中添加参考的解决方案,如图所示,

<add assembly="System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

希望你的建议

谢谢

4

2 回答 2

0

从这段代码:

 svcClient.GetInventoryProjectDetailCompleted += new EventHandler<CIService.GetInventoryProjectDetailCompletedEventArgs>(svcClient_GetInventoryProjectDetailCompleted);

这似乎GetInventoryProjectDetailCompleted不是方法而是事件,不是吗?

可能你会发现这个异步调用的例子很有用:

http://www.codeproject.com/Articles/91528/How-to-Call-WCF-Services-Synchronously-and-Asynchr

于 2013-04-18T13:08:38.533 回答
-2

希望对你有帮助

Line 10:          var currentYear = date.getFullYear();
Line 11: 
Line 12:          var txtPurchaseDate = '<%=txtPurchaseDate.ClientId %>';
Line 13: 
Line 14:          $('#' + txtPurchaseDate).datepicker({
于 2013-08-01T06:26:02.470 回答