private void btnBuscar_Click(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(cboUsuarios.SelectedValue.ToString().Trim()))
                {
                    MessageBox.Show("Seleccione un ejecutivo", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    cboUsuarios.Focus();
                    return;
                }

                CarteraSocioBE oEntity = new CarteraSocioBE()
                {
                    OPCION    = 5,
                    USUARIO   = General.General.GetUsuario,
                    UsuarioID = cboUsuarios.SelectedValue.ToString()
                };
                DataSet ds = new DataSet();
                ds = new CarteraSocioBL().ProcesarCarteraSocio(oEntity);
                dgvSocios.DataSource = ds.Tables[0];
                lblRegistros.Text    = ds.Tables[0].Rows.Count.ToString() + " registro(s)";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            try
            {
                //if (string.IsNullOrEmpty(txtIdPagadora.Text.Trim()) && string.IsNullOrEmpty(txtIdSocio.Text.Trim()) && dtFechaInicio.Value == null)
                //{
                //    MessageBox.Show("Al menos debe ingresar un filtro", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                //    return;
                //}

                CarteraSocioBE oEntity = new CarteraSocioBE()
                {
                    OPCION         = 4,
                    USUARIO        = General.General.GetUsuario,
                    IdSocio        = txtIdSocio.Text,
                    gestorCuentaID = cboEjecutivo.SelectedValue.ToString(),
                    IdPagadora     = txtIdPagadora.Text,
                    FechaInicio    = dtFechaInicio.Value == null ? DateTime.MinValue : dtFechaInicio.Value,
                    FechaFin       = dtFechaFin.Value == null ? DateTime.MinValue : dtFechaFin.Value,
                    FechaInactivo1 = dtFechaInactivo1.Value == null ? DateTime.MinValue : dtFechaInactivo1.Value,
                    FechaInactivo2 = dtFechaInactivo2.Value == null ? DateTime.MinValue : dtFechaInactivo2.Value,
                    NumDias        = chkSociosInactivos.Checked ? 1 : 0
                };
                DataSet ds = new DataSet();
                ds = new CarteraSocioBL().ProcesarCarteraSocio(oEntity);
                dgvSocios.DataSource = ds.Tables[0];
                lblNRegistros.Text   = ds.Tables[0].Rows.Count.ToString() + " registro(s)";

                ((CheckBox)dgvSocios.Controls.Find("ChkSelAsignar", true)[0]).Checked = false;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }