private void btnFacturar_Click(object sender, EventArgs e) { try { if (contFila != 0) { if (cbTipoPago.Text.FirstOrDefault().ToString() == "3" || cbTipoPago.Text.FirstOrDefault().ToString() == "4") { if (clientesNegocio.VerificarCredito(Convert.ToInt32(txtClienteID.Text), Convert.ToDecimal(txtTotal.Text))) { VerificarTipoFactura(); CrearLineaCreditoVenta(); } else { MessageBox.Show("Cliente no posee creditos suficientes para la compra...", "Creditos Insuficientes", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { VerificarTipoFactura(); } } } catch (Exception exc) { MessageBox.Show("Error: " + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); loggeator.EscribeEnArchivo(exc.ToString()); } }