private void generarCompra()
        {
            Dictionary<String, gdDataBase.ValorTipo> camposValores = new Dictionary<string, gdDataBase.ValorTipo>();
            Dictionary<int, String> errorMensaje = new Dictionary<int, string>();

            camposValores.Add("id_viaje", new gdDataBase.ValorTipo(compraARealizar.idViaje.ToString(), SqlDbType.Int));
            camposValores.Add("dni", new gdDataBase.ValorTipo(textBoxDNI.Text, SqlDbType.Int));
            camposValores.Add("hoy", new gdDataBase.ValorTipo(Config.fecha.ToString(), SqlDbType.DateTime));

            var spExec = new SPExecGetData("ÑUFLO.CrearCompra", camposValores, null);

            var dt = (DataTable)spExec.Exec();

            if (spExec.huboError())
            {
                spExec.mostrarErrorSqlProducido();
                MessageBox.Show(spExec.codError().ToString());
                throw new CompraException();
            }
            compraARealizar = new FormSeleccionViaje.Compra(compraARealizar.idViaje,
                Convert.ToInt32(textBoxDNI.Text), Convert.ToInt32(dt.Rows[0].ItemArray[0]));

            pnr = Convert.ToInt32(dt.Rows[0].ItemArray[0]);
        }