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);

            }

        }


    }

 

posted @ 2011-08-04 20:31  dodo-yufan  阅读(2650)  评论(0编辑  收藏  举报