private void botonComprar_Click(object sender, EventArgs e)
        {
            if (compraValida())
            {
                Form frmCargaDeDatos = new Compra.cargaDeDatos();
                ((TextBox)frmCargaDeDatos.Controls["textBoxTipoForm"]).Text = this.numericUpDownPasajes.Value.ToString();
                ((TextBox)frmCargaDeDatos.Controls["textBoxIDVuelo"]).Text = this.dataGridViajes.SelectedCells[0].Value.ToString();
                ((TextBox)frmCargaDeDatos.Controls["textBox1"]).Text = this.numericUpDownEncomiendas.Value.ToString();

                funcionesComunes.deshabilitarVentanaYAbrirNueva(frmCargaDeDatos);
            }
        }
 private void botonComprar_Click(object sender, EventArgs e)
 {
     if (compraValida())
     {
         string fechaSalida = String.Format("{0:yyyyMMdd HH:mm:ss}", Convert.ToDateTime(this.dataGridViajes.SelectedCells[1].Value.ToString()));
         string fechaLlegada = String.Format("{0:yyyyMMdd HH:mm:ss}", Convert.ToDateTime(this.dataGridViajes.SelectedCells[2].Value.ToString()));
         string origen = this.dataGridViajes.SelectedCells[3].Value.ToString();
         string destino = this.dataGridViajes.SelectedCells[4].Value.ToString();
         Form frmCargaDeDatos = new Compra.cargaDeDatos(fechaSalida,fechaLlegada,origen,destino);
         ((TextBox)frmCargaDeDatos.Controls["textBoxCantPasajes"]).Text = this.numericUpDownPasajes.Value.ToString();
         ((TextBox)frmCargaDeDatos.Controls["textBoxIDVuelo"]).Text = this.dataGridViajes.SelectedCells[0].Value.ToString();
         ((TextBox)frmCargaDeDatos.Controls["textBoxKgEncomiendas"]).Text = this.textBoxKgEncomienda.Text;
         funcionesComunes.deshabilitarVentanaYAbrirNueva(frmCargaDeDatos);
     }
 }