Example #1
0
        //carga en los campos la informaciĆ³n del viaje seleccionado
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            button2.Enabled = true;

            viaje selec = comboBox1.SelectedItem as viaje;

            textBox1.Text = selec.dev_origen();                          //ORIGEN
            textBox2.Text = selec.dev_destino();                         //DESTINO
            textBox3.Text = selec.dev_categoria();                       //CATEGORIA
            textBox4.Text = selec.dev_empresa();                         //EMPRESA
            textBox5.Text = selec.dev_fecha();                           //FECHA
            textBox6.Text = selec.dev_hora();                            //HORA
            textBox7.Text = (selec.asientos_libres().Last()).ToString(); //ASIENTO COMPRADO
            textBox8.Text = selec.devolver_tipo();                       //TIPO DE PASAJE
        }