Ejemplo n.º 1
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (TextBox1.Text != "")
     {
         ServiceReference1.Service1Client client = new ServiceReference1.Service1Client();
         int c = Convert.ToInt32(TextBox1.Text);
         int result1 = client.c2f(c);
         TextBox2.Text = Convert.ToString(result1);
         client.Close();
     }
 }
Ejemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if(textBox1.Text!="")
     {
         ServiceReference1.Service1Client client = new ServiceReference1.Service1Client();
         int c = Convert.ToInt32(textBox1.Text);
         int result1 = client.c2f(c);
         textBox2.Text = Convert.ToString(result1);
         client.Close();
     }
     else
     {
         MessageBox.Show("Please Enter Valid Number");
     }
 }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            ServiceReference1.Service1Client client = new ServiceReference1.Service1Client();

            Console.WriteLine("Enter the temperature in Celcius\n");
            int c = Convert.ToInt32(Console.ReadLine());
            int result1 = client.c2f(c);

            Console.WriteLine("Temperature in Fahrenheit is : {0} \n", result1);

            Console.WriteLine("Enter the temperature in Fahrenheit\n");
            int f = Convert.ToInt32(Console.ReadLine());
            int result2 = client.f2c(f);

            Console.WriteLine("Temperature in Celcius is : {0} \n", result2);

            client.Close();

            Console.WriteLine("Press ENTER to exit\n");
            Console.ReadLine();
        }
Ejemplo n.º 4
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     ServiceReference1.Service1Client proxy = new ServiceReference1.Service1Client();
     int c = proxy.c2f(Convert.ToInt32(TextBox2.Text));
     Label4.Text = "Result: " + c + " degree F";
 }