zoukankan      html  css  js  c++  java
  • WebService 调用小例程

    Author:quietwalk   Date:2010-09-14

    using System;
    using System.Linq;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;

    using GPRSTest.CommonFunctionService;//http://固定IP:14813/Service1.asmx

    namespace GPRSTest
    {
        public partial class frmWebServiceTest : Form
        { 
            public frmWebServiceTest()
            {
                InitializeComponent();
            }


            private void btnResult_Click(object sender, EventArgs e)
            {

                int a = Convert.ToInt16(this.tbA.Text.Trim());
                int b = Convert.ToInt16(this.tbB.Text.Trim());

                DateTime dtStart = DateTime.Now;

                CommonFunctionService.Service cs = new Service();
                int iResult = cs.intAdd(a, b);

                this.lbHelloWorld.Text = cs.HelloWorld();

                DateTime dtEnd = DateTime.Now;

                this.lbInfo.Text ="所用时间:  "+QuietwalkClassLibrary.CommonFunctions.GetTimeSpan(dtStart, dtEnd).ToString()+"秒";


                this.tbResult.Text = iResult.ToString();
            }

            private void btnResult_Click_1(object sender, EventArgs e)
            {
                this.lbInfo.Text = "正在调用 Webservice。。。 ";

                btnResult_Click(sender, e);

            }

            private void frmWebServiceTest_Load(object sender, EventArgs e)
            {

                this.btnResult.Focus();
            }

          
           
        }
    }

  • 相关阅读:
    Tomcat+Nginx+Linux+Mysql部署豆瓣TOP250的项目到腾讯云服务器
    使用JSP+Servlet+Jdbc+Echatrs实现对豆瓣电影Top250的展示
    环境搭建-CentOS集群搭建
    环境搭建-Hadoop集群搭建
    ELK搭建实时日志分析平台
    Flume和Kafka完成实时数据的采集
    Python日志产生器
    腐竹木耳炒肉
    [转]Apple耳机兼容非Mac设置
    文件及文件夹操作
  • 原文地址:https://www.cnblogs.com/quietwalk/p/1825726.html
Copyright © 2011-2022 走看看