当前位置: 首页>>代码示例>>C#>>正文


C# Service1Client.GetData方法代码示例

本文整理汇总了C#中Service1Client.GetData方法的典型用法代码示例。如果您正苦于以下问题:C# Service1Client.GetData方法的具体用法?C# Service1Client.GetData怎么用?C# Service1Client.GetData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Service1Client的用法示例。


在下文中一共展示了Service1Client.GetData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Button2_Click

        protected void Button2_Click(object sender, EventArgs e)
        {
            int t3 = 1;

            if (Label4.Text==null)
            {
                RegisterStartupScript("startupScript", "<script language=JavaScript>alert('Please find the Bus stations first....');</script>");
            }
            Service1Client ip1 = new Service1Client();
            string t1 = TextBox1.Text;
            string t2 = TextBox2.Text;         //Stores the input string
            string d=null;
            if (t2.Trim() == "" || t2.Trim() == "." || t2.Trim() == "-")
            {
                RegisterStartupScript("startupScript", "<script language=JavaScript>alert('Please enter a valid name from the list');</script>");
            }
            else
            {
                 d = String.Join("", ip1.GetData(t2,t1,t3));
            }
            if (string.IsNullOrEmpty(d))     //If no store available
            {
                Label6.Text = "No station available";

            }
            else
            {
                Label6.Text = d;

            }
        }
开发者ID:agupt103,项目名称:Tour-guide-application,代码行数:31,代码来源:BusForm.aspx.cs

示例2: Window_Loaded

 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     Service1Client sc = new Service1Client();
     string message = sc.GetData(5000);
     lblMessage.Content = message;
     sc.Close();
 }
开发者ID:vramsngrai1994,项目名称:mkpacific-ltd,代码行数:7,代码来源:MainWindow.xaml.cs

示例3: button1_Click

 private void button1_Click(object sender, EventArgs e)
 {
     var sc = new Service1Client();
     var msg = sc.GetData(10);
     MessageBox.Show(msg);
     sc.Close();
 }
开发者ID:zhang5171291,项目名称:TestCode,代码行数:7,代码来源:Form1.cs

示例4: Button1_Click

        protected void Button1_Click(object sender, EventArgs e)
        {
            Service1Client ip = new Service1Client();
            int t1 = 0;
            string name = null;
            string t = TextBox1.Text;         //Stores the input string

            if (t.Trim() == "" || t.Trim() == "." || t.Trim() == "-")
            {

                RegisterStartupScript("startupScript", "<script language=JavaScript>alert('Please enter a valid ZipCode or Address');</script>");

            }
            else
            {
                string d = String.Join("", ip.GetData(name,t,t1));
                if (string.IsNullOrEmpty(d))     //If no store available
                {
                    Label4.Text = "No station available";
                    //ViewState["Acc"] = 1;
                }
                else
                {
                    Label4.Text = d;
                   // ViewState["Acc"] = 1;
                }
            }
        }
开发者ID:agupt103,项目名称:Tour-guide-application,代码行数:28,代码来源:BusForm.aspx.cs

示例5: Main

 static void Main(string[] args)
 {
     var client = new Service1Client();
     var a = client.GetData(43);
     Console.WriteLine(a);
     Console.ReadLine();
 }
开发者ID:ajinkya1221,项目名称:HelloWcf,代码行数:7,代码来源:Program.cs

示例6: button3_Click

 private void button3_Click(object sender, EventArgs e)
 {
     this.Cx.Value = 3;
     this.Cy.Value = 7;
     this.Dx.Value = 4;
     //dataGridView1.Rows.Clear();
     Service1Client Client = new Service1Client();
     Point C = new Point((int)Cx.Value, (int)Cy.Value);
     Point D = new Point((int)Dx.Value, (int)Cy.Value);
     float r = (float)C.Y / 2;
     var data = Client.GetSomeData(C, D);
         float k = data[0];
         float b = data[1];
         float delta = data[2];
         float rectSquare = data[3];
         float square = data[4];
         RealSquare.Text = square.ToString();
         for (int i = 0; i < 5; i++)
         {
             double[] result = Client.GetData(r, k, b, delta, rectSquare, square, C, D, (int)Math.Pow(10, i + 3));
             dataGridView1.Rows.Add();
             dataGridView1.Rows[i].Cells[0].Value = i + 1;
             dataGridView1.Rows[i].Cells[1].Value = (int)Math.Pow(10, i + 3);
             dataGridView1.Rows[i].Cells[2].Value = result[0];
             dataGridView1.Rows[i].Cells[3].Value = result[1];
             dataGridView1.Rows[i].Cells[4].Value = result[2];
             dataGridView1.Rows[i].Cells[5].Value = result[3];
         }
 }
开发者ID:tassyok,项目名称:cw-tp,代码行数:29,代码来源:Window.cs

示例7: Main

 static void Main(string[] args)
 {
     Service1Client client = new Service1Client();
     client.ClientCredentials.UserName.UserName = "test";
     client.ClientCredentials.UserName.Password = "test";
     client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
     var s = client.GetData(30);
 }
开发者ID:antonysamy931,项目名称:WCF-WsHttpBinding,代码行数:8,代码来源:Program.cs

示例8: Main

 static void Main(string[] args)
 {
     Service1Client client = new Service1Client();
     client.ClientCredentials.UserName.UserName = "test";
     client.ClientCredentials.UserName.Password = "test";
     var obj = client.GetData(10);
     Console.Read();
 }
开发者ID:antonysamy931,项目名称:WCF-WsHttpBinding,代码行数:8,代码来源:Program.cs

示例9: Main

 static void Main()
 {
     using (var client = new Service1Client())
     {
         string s = client.GetData(123);
         var ct = new CompositeType { BoolValue = true, StringValue = s };
         var resp = client.GetDataUsingDataContract(ct);
     }
 }
开发者ID:Erguotou,项目名称:protobuf-net,代码行数:9,代码来源:Program.cs

示例10: Main

 static void Main(string[] args)
 {
     // Creating Proxy for the MyService
     Service1Client client = new Service1Client();
     Console.WriteLine("Client calling the service...");
     Console.WriteLine("Hello Ram");
     Console.WriteLine(client.GetData(1132));
     Console.Read();
 }
开发者ID:jojozhuang,项目名称:Study,代码行数:9,代码来源:Program.cs

示例11: Main

 static void Main(string[] args)
 {
     Service1Client proxy = new Service1Client();
     proxy.ClientCredentials.UserName.UserName = "abc";
     proxy.ClientCredentials.UserName.Password = "abc";
     proxy.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
     proxy.Open();
     Console.WriteLine(proxy.GetData(1213));
     Console.ReadKey();
 }
开发者ID:phoenix2fire,项目名称:wcf-custom-authentication,代码行数:10,代码来源:Program.cs

示例12: Window_Loaded

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            int x = 12345;

            //ServiceHost sh = new ServiceHost(typeof(Service1Client));
            Service1Client sc = new Service1Client();
            string message = sc.GetData(x);
            lblMessage.Content = message;
            sc.Close();
        }
开发者ID:vramsngrai1994,项目名称:mkpacific-ltd,代码行数:10,代码来源:MainWindow.xaml.cs

示例13: Main

 static void Main(string[] args)
 {
     Service1Client client = new Service1Client();
     Console.WriteLine(client.GetData(10));
     Console.ReadLine();
     CompositeType ct = new CompositeType();
     ct.BoolValue = true;
     ct.StringValue = "Karen ";
     ct=client.GetDataUsingDataContract(ct);
     Console.WriteLine(ct.StringValue);
     Console.ReadLine();
     client.Close();
 }
开发者ID:Tonoyankar,项目名称:WCFServices,代码行数:13,代码来源:Program.cs

示例14: Main

        static void Main(string[] args)
        {
            var client = new Service1Client();

            while (true)
            {
                var input = Console.ReadLine();
                var i = 0;
                int.TryParse(input, out i);
                var result = client.GetData(i);
                Console.WriteLine(result);
            }
        }
开发者ID:fzhenmei,项目名称:WCFEvent,代码行数:13,代码来源:Program.cs

示例15: Main

        static void Main(string[] args)
        {
            var client = new Service1Client();

            //System.Net.ServicePointManager.ServerCertificateValidationCallback +=
            //    (se, cert, chain, sslerror) =>
            //    {
            //        return true;
            //    };

            var result = client.GetData(1);

            Console.WriteLine(result);
        }
开发者ID:gerardbeckerleg,项目名称:Proto.SecureWCF,代码行数:14,代码来源:Program.cs


注:本文中的Service1Client.GetData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。