private void btnAceptar_Click(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(txtIdSocio.Text))
                {
                    MessageBox.Show("Ingrese un socio", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }

                if (dtInicioProceso.Value == DateTime.MinValue)
                {
                    MessageBox.Show("Ingrese una fecha", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }

                SocioConfiguracionECBE oEntity = new SocioConfiguracionECBE();
                oEntity.OPCION          = 2;
                oEntity.USUARIO         = General.General.GetCodigoUsuario;
                oEntity.IdSocio         = txtIdSocio.Text;
                oEntity.dtInicioProceso = dtInicioProceso.Value;
                new SocioConfiguracionECBL().ProcesarSocioConfiguracionEC(oEntity);

                MessageBox.Show("Se Proceso Correctamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Dispose();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void btnEliminar_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = 0;

            try
            {
                if (dgvEstadoCuenta.RowCount > 0)
                {
                    dialogResult = MessageBox.Show("Seguro de eliminar al socio: " + dgvEstadoCuenta.CurrentRow.Cells["IdSocio_Dsc"].Value.ToString().Trim(), "Confirme", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                    if (dialogResult == DialogResult.Yes)
                    {
                        SocioConfiguracionECBE oEntity = new SocioConfiguracionECBE();
                        oEntity.OPCION  = 3;
                        oEntity.USUARIO = General.General.GetCodigoUsuario;
                        oEntity.IdSocio = dgvEstadoCuenta.CurrentRow.Cells["IdSocio"].Value.ToString();
                        new SocioConfiguracionECBL().ProcesarSocioConfiguracionEC(oEntity);
                        MessageBox.Show("Se Proceso Correctamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        btnBuscar.PerformClick();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void CargarDatos()
        {
            try
            {
                DataSet dsDatos = new DataSet();
                SocioConfiguracionECBE oEntity = new SocioConfiguracionECBE();
                oEntity.OPCION             = 1;
                oEntity.USUARIO            = General.General.GetCodigoUsuario;
                oEntity.IdSocio_Dsc        = TextBoxX1.Text.Trim();
                dsDatos                    = new SocioConfiguracionECBL().ProcesarSocioConfiguracionEC(oEntity);
                dgvEstadoCuenta.DataSource = dsDatos.Tables[0];

                lblRegistros.Text = dsDatos.Tables[0].Rows.Count + " registro(s)";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void CargarDatos()
        {
            try
            {
                DataSet dsDatos = new DataSet();
                SocioConfiguracionECBE oEntity = new SocioConfiguracionECBE();
                oEntity.OPCION  = 1;
                oEntity.USUARIO = General.General.GetCodigoUsuario;
                oEntity.IdSocio = Codigo;
                dsDatos         = new SocioConfiguracionECBL().ProcesarSocioConfiguracionEC(oEntity);

                if (dsDatos.Tables[0].Rows.Count > 0)
                {
                    txtIdSocio.Text          = dsDatos.Tables[0].Rows[0]["IdSocio"].ToString();
                    txtRazonSocialSocio.Text = dsDatos.Tables[0].Rows[0]["IdSocio_Dsc"].ToString();
                    dtInicioProceso.Value    = Convert.ToDateTime(dsDatos.Tables[0].Rows[0]["dtInicioProceso"].ToString());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        public DataSet ProcesarSocioConfiguracionEC(SocioConfiguracionECBE BE)
        {
            DataSet dsResult;

            try
            {
                cmd = db.GetStoredProcCommand("SocioConfiguracionEC_Mnt");
                db.AddInParameter(cmd, "OPCION", DbType.Int32, BE.OPCION);
                db.AddInParameter(cmd, "USUARIO", DbType.String, BE.USUARIO);
                db.AddInParameter(cmd, "IdSocio", DbType.String, BE.IdSocio);
                db.AddInParameter(cmd, "IdSocio_Dsc", DbType.String, BE.IdSocio_Dsc);
                if (BE.dtInicioProceso != DateTime.MinValue)
                {
                    db.AddInParameter(cmd, "dtInicioProceso", DbType.DateTime, BE.dtInicioProceso);
                }
                dsResult = db.ExecuteDataSet(cmd);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(dsResult);
        }
 public DataSet ProcesarSocioConfiguracionEC(SocioConfiguracionECBE BE)
 {
     return(SocioConfiguracionECDA.ProcesarSocioConfiguracionEC(BE));
 }