webservice使用泛型方法
webservice方法:
[WebMethod]
public List<UnitTable> AccessDownloadSimnetHallCourses(string U_UserNO)
{
return BusinessFacade.UnitAccessDownloadSimnetHallCourses(U_UserNO);
}
调用方法:
private Service.WebTeacherService ServiceModel = new Service.WebTeacherService();
protected void Page_Load(object sender, EventArgs e)
{
Service.UnitTable[] ut = ServiceModel.AccessDownloadSimnetHallCourses("keqi0001");
if (ut.Length >0)
{
for (int i = 0; i < ut.Length; i++ )
{
Response.Write(ut[i].DuanYuanID);
}
}
}