惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
D
Docker
Microsoft Security Blog
Microsoft Security Blog
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
Y
Y Combinator Blog
Vercel News
Vercel News
F
Fortinet All Blogs
B
Blog
Recent Announcements
Recent Announcements
A
About on SuperTechFans
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - Franky
MongoDB | Blog
MongoDB | Blog
Stack Overflow Blog
Stack Overflow Blog
B
Blog RSS Feed
C
Check Point Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Visual Studio Blog
月光博客
月光博客

博客园 - 指南针

EpCloud开发日志 为服务创建安装程序 opcrcw.da.dll 和.net 4.0 .net中线程同步的典型场景和问题(1) 如何取消后台线程的执行 python中使用汉字 Ext对基本类型的扩展 OWC ChartSpace控件的使用 OWC PivotTable的使用方法 Sql Server 生成数据透视表 wince5.0 key 修改IP地址后,原来的连接还有存在吗? Window下减少重绘的方法 .Net精简框加下子类化控件 Wince5.0中修改IP地址需不重启即可生效 Extjs combobox Windows workflow中的IEventActivity接口 使MSSql Server 视图可更新 javascript中的基本数据类型
winform 通过WCF上传Dataset数据
指南针 · 2015-01-13 · via 博客园 - 指南针

1. 新建一个WCF服务应用程序。

2. 在WCF服务中添加一个服务Data,在其中添加一个方法Upload(DataSet ds),并实现该方法。注意:在服务接口中将此方法标记为OperationContract.

3. 启动WCF服务程序。

4. 在Winform中添加"服务应用",在浏览地址栏中填"http://localhost:4420/Data.svc",在对话框中设置合适的命名空间。

5. 在Winform中使用如下代码提交数据


var ds = GetCachedData();
//var data = new EpCloud.DataClient();
var binding = new BasicHttpBinding();
var endpoint = new EndpointAddress("http://localhost:4420/Data.svc");
var data = new DataClient(binding, endpoint);
data.Upload(ds, "1");