Ejemplo n.º 1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        ServiceReference2.ServiceClient client = new ServiceReference2.ServiceClient();
        string quote = client.getQoute();

        Label1.Text = quote;
    }
Ejemplo n.º 2
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     string placeorzip1 = TextBox1.Text;
     string storename1 = TextBox2.Text;
     ServiceReference2.ServiceClient myservice = new ServiceReference2.ServiceClient();
     Label1.Text = myservice.storeLocate(placeorzip1, storename1);
     String str = "place or zip: " + placeorzip1 + "\n" + " store:" + storename1 + "\n" + myservice.storeLocate(placeorzip1, storename1);
     Cache.Insert("CacheItem2", str, null, DateTime.Now.AddMinutes(10), TimeSpan.Zero);
 }
        protected void Button1_Click(object sender, EventArgs e)
        {
            ServiceReference2.ServiceClient weather = new ServiceReference2.ServiceClient();

            string [] result = weather.weatherservice(TextBox1.Text);
            TextBox2.Text = result[0];
            TextBox3.Text = result[1];
            TextBox4.Text = result[2];
            TextBox5.Text = result[3];
            TextBox6.Text = result[4];
        }
Ejemplo n.º 4
0
 // String Decrytion
 private void button5_Click(object sender, EventArgs e)
 {
     if (textBox7.Text!="")
     {
         ServiceReference2.ServiceClient client_1 = new ServiceReference2.ServiceClient();
         textBox8.Text = client_1.Decrypt(textBox7.Text);
         client_1.Close();
     }
     else
     {
         MessageBox.Show("Enter Valid String to Encrypt");
     }
 }
 // event generated for implementation of encryption and decryption function
 private void button2_Click(object sender, EventArgs e)
 {
     ServiceReference2.ServiceClient ob = new ServiceReference2.ServiceClient(); // adding a service client reference object
     string s = ob.Encrypt(textBox2.Text); // using the encrypt function
     textBox3.Text = s;
 }