本文整理汇总了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;
}
}
示例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();
}
示例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();
}
示例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;
}
}
}
示例5: Main
static void Main(string[] args)
{
var client = new Service1Client();
var a = client.GetData(43);
Console.WriteLine(a);
Console.ReadLine();
}
示例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];
}
}
示例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);
}
示例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();
}
示例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);
}
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
}
示例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);
}