private void btnNuevo_Click(object sender, EventArgs e)
 {
     try
     {
         frmIngresoSocio ofrm = new frmIngresoSocio();
         ofrm.Operacion   = "N";
         ofrm.FlgValSocio = "0";
         ofrm.Codigo      = string.Empty;
         ofrm.ShowDialog();
         btnBuscar.PerformClick();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 private void btnEditar_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvTercerCaso.RowCount > 0)
         {
             frmIngresoSocio ofrm = new frmIngresoSocio();
             ofrm.Operacion = "M";
             ofrm.Codigo    = dgvTercerCaso.CurrentRow.Cells["IdTercerCaso"].Value.ToString().Trim();
             ofrm.ShowDialog();
             btnBuscar.PerformClick();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }