private void btnRealizarCobro_Click(object sender, EventArgs e)
 {
     if (dgvLineasVentasCredito.Rows.Count != 0)
     {
         CargarVariables();
         InsertarCobroVentaCredito insertarCobroVentaCredito = null;
         insertarCobroVentaCredito = InsertarCobroVentaCredito.Instance();
         insertarCobroVentaCredito.ShowDialog();
         dgvLineasVentasCredito.RefreshEdit();
     }
 }
 public static InsertarCobroVentaCredito Instance()
 {
     if (((frmInstance == null) || (frmInstance.IsDisposed == true)))
     {
         frmInstance = new InsertarCobroVentaCredito();
     }
     else
     {
         frmInstance.BringToFront();
     }
     return(frmInstance);
 }
 private void btnRealizarCobro_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvLineasVentasCredito.Rows.Count != 0)
         {
             CargarVariables();
             InsertarCobroVentaCredito insertarCobroVentaCredito = null;
             insertarCobroVentaCredito = InsertarCobroVentaCredito.Instance();
             insertarCobroVentaCredito.ShowDialog();
             dgvLineasVentasCredito.RefreshEdit();
         }
     }
     catch (Exception exc)
     {
         MessageBox.Show("Error: " + exc.ToString(),
                         "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         loggeator.EscribeEnArchivo(exc.ToString());
     }
 }