WebService 传值为什么不能强制转换
webservice[WebMethod(Description = "aa")]
public CustomerDeviceInfoEntity GetNamefromCustomerid(int customerid)
{
CustomerDeviceInfoEntityCollection coll = CustomerDeviceInfoEntity.SelectWhere(" customerid='" + customerid + "'");
if (coll.Count > 0)
return coll[0];
else
return null;
}
调用页
CustomerDeviceInfoEntity ent = new CustomerDeviceInfoEntity();
ent = (CustomerDeviceInfoEntity)web.GetNamefromCustomerid(11);
this.TextBox1.Text = ent.RecordDateTime.ToString();
编译后提示错误
无法将类型“DemoWeb.localhost.CustomerDeviceInfoEntity”转换为“IDH.DAO.CustomerDeviceInfoEntity” D:\mxy\DemoWeb\DemoWeb\WebForm1.aspx.cs 48 18 DemoWeb
请问这个怎么调用啊
--------------------编程问答-------------------- 难道不支持强制转换吗 --------------------编程问答--------------------
webservice 返回的是xml格式的 你这个是一个模型 怎么可能呢 --------------------编程问答-------------------- 全部带上完整的命名空间,例如IDH.DAO.CustomerDeviceInfoEntity
补充:.NET技术 , ASP.NET