コード例 #1
0
 private void AltaReservas_Load(object sender, EventArgs e)
 {
     if (!editar)
     {
         TDateTimePickerFechaInicio.Value = TDateTimePickerFechaFin.Value = DateTime.Today;
         EN.ENReservas enRes = new EN.ENReservas();
         DataSet dsRes = new DataSet();
         dsRes = enRes.RellenarCategoria();
         RellenarCategoria(dsRes);
     }
 }
コード例 #2
0
 private void TComboBoxModelo_Click(object sender, EventArgs e)
 {
     if (editar && editar2)
     {
         string[] texto = { TComboBoxCategoria.Text, TComboBoxMarca.Text, TComboBoxModelo.Text, TComboBoxMatricula.Text };
         EN.ENReservas enRes = new EN.ENReservas();
         DataSet dsRes = new DataSet();
         dsRes = enRes.RellenarCategoria();
         editar = false;
         RellenarCategoria(dsRes);
         TComboBoxCategoria.SelectedIndex = TComboBoxCategoria.FindStringExact(texto[0]);
         TComboBoxMarca.SelectedIndex = TComboBoxMarca.FindStringExact(texto[1]);
         TComboBoxModelo.SelectedIndex = TComboBoxModelo.FindStringExact(texto[2]);
         TComboBoxMatricula.SelectedIndex = TComboBoxMatricula.FindStringExact(texto[3]);
     }
 }