private void txtIdProducto_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)13)
            {
                int idProducto = IntegerExtensions.ParseInt(txtIdProducto.Text);

                try
                {
                    Producto prod = Producto.traerPorId(idProducto);
                    if (prod != null)
                    {
                        int folio = IntegerExtensions.ParseInt(txtFolio.Text);

                        if (folio == 0)
                        {
                            Cliente client   = (Cliente)cboClientes.SelectedItem;
                            int     iva      = IntegerExtensions.ParseInt(txtIVA.Text);
                            string  modoPago = txtModoPago.Text;
                            var     nuevaFac = new Factura(client.idCliente, iva, modoPago);
                            txtFolio.Text = nuevaFac.guardar().ToString();
                        }

                        int cantidad = IntegerExtensions.ParseInt(txtCantidad.Text);
                        var detalle  = new DetalleFactura(folio,
                                                          prod.idProducto,
                                                          cantidad,
                                                          prod.precioVenta);

                        detalle.guardar();
                        cargarDatos();
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }