Пример #1
0
 // city codes operation
 protected void Button4_Click1(object sender, EventArgs e)
 {
     // open proxy
     FlightReference.Service1Client client = new FlightReference.Service1Client();
     // call operation
     string[] result = client.getCityCodes(TextBox6.Text, TextBox7.Text);
     // display data
     Label29.Text = result[0];
     Label30.Text = result[1];
 }
Пример #2
0
        // get city codes operation
        protected void Button5_Click(object sender, EventArgs e)
        {
            // open proxy
            FlightReference.Service1Client client = new FlightReference.Service1Client();
            // call operation
            string[] result = client.searchFlights(TextBox8.Text, TextBox9.Text, TextBox10.Text);
            // if length == 1, error. Clear labels and display error message in first label
            if (result.Length == 1)
            {
                // first result
                Label32.Text = result[0];
                Label33.Text = "...";
                Label34.Text = "...";
                Label35.Text = "...";
                Label36.Text = "...";
                Label37.Text = "...";
                Label38.Text = "...";
                Label39.Text = "...";
                Label40.Text = "...";
                Label41.Text = "...";
                // second result
                Label42.Text = result[0];
                Label43.Text = "...";
                Label44.Text = "...";
                Label45.Text = "...";
                Label46.Text = "...";
                Label47.Text = "...";
                Label48.Text = "...";
                Label49.Text = "...";
                Label50.Text = "...";
                Label51.Text = "...";
                // third result
                Label52.Text = result[0];
                Label53.Text = "...";
                Label54.Text = "...";
                Label55.Text = "...";
                Label56.Text = "...";
                Label57.Text = "...";
                Label58.Text = "...";
                Label59.Text = "...";
                Label60.Text = "...";
                Label61.Text = "...";
            }
            else
            {
                // first result
                Label32.Text = result[0];
                Label33.Text = result[2];
                Label34.Text = result[3];
                Label35.Text = result[5];
                Label36.Text = result[6];
                Label37.Text = result[7];
                Label38.Text = result[8];
                Label39.Text = result[9];
                Label40.Text = result[10];
                Label41.Text = result[11];
                // second result
                if (result.Length >= 13)
                {
                    Label42.Text = result[12];
                    Label43.Text = result[14];
                    Label44.Text = result[15];
                    Label45.Text = result[17];
                    Label46.Text = result[18];
                    Label47.Text = result[19];
                    Label48.Text = result[20];
                    Label49.Text = result[21];
                    Label50.Text = result[22];
                    Label51.Text = result[23];
                }

                // third result
                if (result.Length >= 25)
                {
                    Label52.Text = result[24];
                    Label53.Text = result[26];
                    Label54.Text = result[27];
                    Label55.Text = result[29];
                    Label56.Text = result[30];
                    Label57.Text = result[31];
                    Label58.Text = result[32];
                    Label59.Text = result[33];
                    Label60.Text = result[34];
                    Label61.Text = result[35];
                }
            }
        }