public Form_Habilitar_Piloto(HabilitarPiloto habilitarPiloto, Usuario usuario) { InitializeComponent(); piloto = usuario; habilitarP = habilitarPiloto; labelRut.Content = piloto.Rut; labelNombre.Content = piloto.Nombre; nePiloto = new NePiloto(); ds = new DataSet(); ds = nePiloto.getTipoPilotoAll(); comboBoxipoLicencia.DisplayMemberPath = "NOMBRE"; comboBoxipoLicencia.SelectedValuePath = "ID_TIPO_LICENCIA"; comboBoxipoLicencia.ItemsSource = ds.Tables["piloto_tipoAll"].DefaultView; Console.Write("!!" + usuario.Licencia.FechaExpiracion); if (piloto.Licencia.TipoLicencia.NombreLicencia != null) { comboBoxipoLicencia.Text = piloto.Licencia.TipoLicencia.NombreLicencia; } if (usuario.Licencia.FechaEmision.ToString("dd'/'MM'/'yyyy") != "01/01/0001") { fechaEmisionLicencia.Text = piloto.Licencia.FechaEmision.ToString(); } if (usuario.Licencia.FechaExpiracion.ToString("dd'/'MM'/'yyyy") != "01/01/0001") { fechaVencimientoLicencia.Text = piloto.Licencia.FechaExpiracion.ToString(); } if (piloto.FechaMeAeroespacial.ToString("dd'/'MM'/'yyyy") != "01/01/0001") { fechaVencMedicina.Text = piloto.FechaMeAeroespacial.ToString(); } }
private void buttonHabilitarPiloto_Click(object sender, RoutedEventArgs e) { HabilitarPiloto habilitarPiloto = new HabilitarPiloto(); habilitarPiloto.ShowDialog(); }