• 如何引用webservice


    using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls;

    /// <summary> /// User_WebService 的摘要说明 /// </summary> [System.Diagnostics.DebuggerStepThrough(), System.ComponentModel.DesignerCategory("code"),

      System.Web.Services.WebServiceBinding(Name = "", Namespace = "")]

    public class User_WebService : user_service.Service {    

    //static string User_ServiceURL = System.Configuration.ConfigurationManager.AppSettings["User_ServiceURL"];    

    //static User_WebService SendService = new User_WebService(User_ServiceURL);

            public User_WebService()             : base()         {

                //设置默认webService的地址

                this.Url = "http://localhost:1102/webservice/Service.asmx";

            }

            public User_WebService(string webUrl)             : base()    

         {

                this.Url = webUrl;

            }

            #region 获取用户                

    public static DataSet s_getUser()        

    {     

                        DataSet ds=new DataSet();            

               string User_ServiceURL = System.Configuration.ConfigurationManager.AppSettings["User_ServiceURL"];  

               User_WebService SendService = new User_WebService(User_ServiceURL);

                ds=SendService.GetUser();            

    return ds;        

    }        

    #endregion    

    public static DataSet s_getZzjg()     {               

      DataSet ds = new DataSet();        

    string User_ServiceURL = System.Configuration.ConfigurationManager.AppSettings["User_ServiceURL"];        

    User_WebService SendService = new User_WebService(User_ServiceURL);        

    ds = SendService.GetZzjg();        

    return ds;     }    

    public static DataSet s_getSb()    

    {            

       DataSet ds = new DataSet();        

    string User_ServiceURL = System.Configuration.ConfigurationManager.AppSettings["User_ServiceURL"];        

    User_WebService SendService = new User_WebService(User_ServiceURL);        

    ds = SendService.GetSb();        

    return ds;     }

    }

  • 相关阅读:
    Android开发如何定制framework层服务
    Intellij IDEA通过SVN导入基于Springboot的maven项目以及对已有项目做更新
    intelliJ IDEA 怎么添加本地的idea web项目
    Android热修复之AndFix使用教程
    iOS友盟分享的使用总结
    iOS 传感器集锦
    IOS CALayer的属性和使用
    Swift使用Alamofire实现网络请求
    Android踩坑随笔Fragment中onActivityResult方法不被调用
    上周热点回顾(4.30-5.6)团队
  • 原文地址:https://www.cnblogs.com/hbhzz/p/2939700.html
Copyright © 2020-2023  润新知