private void btnHistorialCobros_Click(object sender, EventArgs e)
 {
     if (dgvLineasVentasCredito.Rows.Count != 0)
     {
         CargarVariables();
         CobrosVentasCredito cobrosVentasCredito = null;
         cobrosVentasCredito = CobrosVentasCredito.Instance();
         cobrosVentasCredito.ShowDialog();
         dgvLineasVentasCredito.RefreshEdit();
     }
 }
 private void btnHistorialCobros_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvLineasVentasCredito.Rows.Count != 0)
         {
             CargarVariables();
             CobrosVentasCredito cobrosVentasCredito = null;
             cobrosVentasCredito = CobrosVentasCredito.Instance();
             cobrosVentasCredito.ShowDialog();
             dgvLineasVentasCredito.RefreshEdit();
         }
     }
     catch (Exception exc)
     {
         MessageBox.Show("Error: " + exc.ToString(),
                         "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         loggeator.EscribeEnArchivo(exc.ToString());
     }
 }