Пример #1
0
        private void Limpiar_Click(object sender, EventArgs e)
        {
            TextMatricula.Text = Aeronave.Matricula;
            NumericKG.Value    = Aeronave.KG;

            if (Aeronave.FechaAlta != null)
            {
                if (Aeronave.FechaAlta != DateTime.MinValue)
                {
                    DateAlta.Value = Convert.ToDateTime(Aeronave.FechaAlta);
                }
                else
                {
                    DateAlta.Value = DateTime.Today;
                }
            }
            else
            {
                DateAlta.Value = DateTime.Today;
            }

            ModeloCombo.SelectedItem       = Aeronave.Modelo;
            ComboFabricante.SelectedItem   = Aeronave.Fabricante;
            ComboTipoServicio.SelectedItem = Aeronave.TipoServicio;
            Aeronave.ListaButacas          = ButacaDAO.GetByAeronave(Aeronave);
            ButacaNumeric.Value            = Aeronave.ListaButacas.Count;
            errorProvider1.Clear();
        }
Пример #2
0
        private void ModificarAeronave_Load(object sender, EventArgs e)
        {
            ComboFabricante.DataSource     = FabricanteDAO.selectAll();
            ComboFabricante.SelectedItem   = Aeronave.Fabricante;
            ComboTipoServicio.DataSource   = TipoServicioDAO.selectAll();
            ComboTipoServicio.SelectedItem = Aeronave.TipoServicio;
            ModeloCombo.DataSource         = ModeloDAO.selectAll();
            ModeloCombo.SelectedItem       = Aeronave.Modelo;
            TextMatricula.Text             = Aeronave.Matricula;
            NumericKG.Value       = Aeronave.KG;
            Aeronave.ListaButacas = ButacaDAO.GetByAeronave(Aeronave);

            if (Aeronave.FechaAlta != null)
            {
                if (Aeronave.FechaAlta != DateTime.MinValue)
                {
                    DateAlta.Value = Convert.ToDateTime(Aeronave.FechaAlta);
                }
                else
                {
                    DateAlta.Value = DateTime.Today;
                }
            }
            else
            {
                DateAlta.Value = DateTime.Today;
            }

            ButacaNumeric.Value = Aeronave.ListaButacas.Count;
        }