public Seleccion_Tripulacion(Usuario p, Ingresar_Vuelo_Pilotos vista)
        {
            InitializeComponent();

            vistaPiloto = vista;


            if (labeRutPilto.Content.ToString() == "")
            {
                piloto = new Usuario();
                piloto = p;
                labeRutPilto.Content      = piloto.Rut;
                labelNombrePiloto.Content = piloto.Nombre;

                triPiloto.RutPiloto   = piloto.Rut;
                triPiloto.Nombre      = piloto.Nombre;
                triPiloto.PuestoVuelo = "Piloto";

                checkBox5050.IsEnabled  = false;
                checkBox6040.IsEnabled  = false;
                checkBox8020.IsEnabled  = false;
                radioButtoncp.IsEnabled = false;
                radioButtonpc.IsEnabled = false;
            }
        }
        public Seleccion_Tripulacion(Usuario p, Tripulacion t, Ingresar_Vuelo_Pilotos vista)
        {
            InitializeComponent();

            vistaPiloto = vista;
            triCopiloto = new Tripulacion();

            if (t.PuestoVuelo == "Piloto")
            {
                labeRutPilto.Content        = t.RutPiloto;
                labelNombrePiloto.Content   = t.Nombre;
                labeRutCopiloto.Content     = p.Rut;
                labelNombreCopiloto.Content = p.Nombre;
            }
            else if (t.PuestoVuelo == "Copiloto")
            {
                labeRutCopiloto.Content     = t.RutPiloto;
                labelNombreCopiloto.Content = t.Nombre;
                labeRutPilto.Content        = p.Rut;
                labelNombrePiloto.Content   = p.Nombre;
            }

            radioButtoncp.IsEnabled = false;
            radioButtonpc.IsEnabled = false;
        }
Example #3
0
        private void ChangeText(object sender, RoutedEventArgs e)
        {
            aeronave = new Aeronave();

            DataRowView row = (DataRowView)dataGridListaNave.SelectedItems[0];

            aeronave.Matricula = row["Matricula"].ToString();
            aeronave.Marca     = row["Marca"].ToString();
            aeronave.TipoAeronave.NombreTipo = row["Tipo de aeronave"].ToString();
            aeronave.VencimientoDgac         = Convert.ToDateTime(row["Venc certificado DGAC"].ToString());
            aeronave.Kmh = row["Velocidad Max"].ToString();
            Sesion.SetValue("aeronave", aeronave);
            neVuelo = new NeVuelo();
            string hora = neVuelo.calcularHorasVuelo(aeronave, Sesion.GetValue <double>("kmDistancia"));

            Sesion.SetValue("horatotalvisual", hora);
            string horatotal = neVuelo.calcularHoraLLegada();

            Sesion.SetValue("showHoraLlegada", horatotal);
            Ingresar_Vuelo_Pilotos next = new Ingresar_Vuelo_Pilotos(this);

            this.Hide();
            next.ShowDialog();
        }