首页 新闻 会员 周边

如何将WebService里的实体赋值给本地的实体

0
悬赏园豆:50 [已关闭问题]

有一个登录程序!运用到WebService!要求WebService里的实体赋值给本地的实体,怎样把WebService里的实体转为本地的实体呢?麻烦大家解答……

问题补充: 能否不要一个一个赋值到本地实体属性的方法呢?
LoveO(∩_∩)O的主页 LoveO(∩_∩)O | 初学一级 | 园豆:55
提问于:2009-06-10 09:44
< >
分享
其他回答(1)
0

先引用Web serivce的实体,再将值赋给本地的实体即可

如:引用Web service的项目的命名空间.cn.com.agronet.CommonAPIService.ServiceEntity sEntity = cn.com.agronet.CommonAPIService.GetDemoEntityByPKID(ID);

if(null!=sEntit)

{

LocalEntity lEntity=new LocalEntity();

lEntity.ID=sEntity.ID;

lEntity.Name=sEntity.Name;

//******

}

邀月 | 园豆:25475 (高人七级) | 2009-06-10 10:27
0

用序列化数据

winzheng | 园豆:8797 (大侠五级) | 2009-06-10 10:56
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册