private void btnEliminar_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = 0;

            try
            {
                if (dgvDatos.RowCount > 0)
                {
                    dialogResult = MessageBox.Show("Seguro de eliminar: " + dgvDatos.CurrentRow.Cells["IdSocio_Dsc"].Value.ToString().Trim(), "Confirme", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                    if (dialogResult == DialogResult.Yes)
                    {
                        TercerCasoSocioBE oEntity = new TercerCasoSocioBE()
                        {
                            OPCION       = 3,
                            USUARIO      = General.General.GetUsuario,
                            IdTercerCaso = dgvDatos.CurrentRow.Cells["IdTercerCaso"].Value.ToString().Trim(),
                            IdSocio      = dgvDatos.CurrentRow.Cells["IdSocio"].Value.ToString().Trim()
                        };

                        new TercerCasoSocioBL().ProcesarTercerCasoSocio(oEntity);
                        MessageBox.Show("Se Proceso Correctamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        CargarDatos();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
 private void CargarDatos()
 {
     try
     {
         TercerCasoSocioBE oEntity = new TercerCasoSocioBE()
         {
             OPCION       = 1,
             USUARIO      = General.General.GetUsuario,
             IdTercerCaso = Codigo
         };
         DataSet ds = new TercerCasoSocioBL().ProcesarTercerCasoSocio(oEntity);
         dgvDatos.DataSource = ds.Tables[0];
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemple #3
0
        public DataSet ProcesarTercerCasoSocio(TercerCasoSocioBE BE)
        {
            DataSet dsResult;

            try
            {
                cmd = db.GetStoredProcCommand("TercerCasoSocio_Mnt");
                db.AddInParameter(cmd, "IdTercerCaso", DbType.String, BE.IdTercerCaso);
                db.AddInParameter(cmd, "IdSocio", DbType.String, BE.IdSocio);
                db.AddInParameter(cmd, "Opcion", DbType.Int32, BE.OPCION);
                db.AddInParameter(cmd, "Usuario", DbType.String, BE.USUARIO);
                dsResult = db.ExecuteDataSet(cmd);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(dsResult);
        }
 private void btnAgregar_Click(object sender, EventArgs e)
 {
     try
     {
         TercerCasoSocioBE oEntity = new TercerCasoSocioBE()
         {
             OPCION       = 2,
             USUARIO      = General.General.GetUsuario,
             IdTercerCaso = Codigo,
             IdSocio      = txtIdSocio.Text.Trim()
         };
         new TercerCasoSocioBL().ProcesarTercerCasoSocio(oEntity);
         txtIdSocio.Clear();
         txtRazonSocialSocio.Clear();
         CargarDatos();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        private void CargarGiradorOriginal()
        {
            try
            {
                TercerCasoSocioBE oEntity = new TercerCasoSocioBE()
                {
                    OPCION  = 4,
                    USUARIO = GeneralXML.CodUsuario,
                    IdSocio = txtIdSocio.Text,
                };

                DataSet ds = new DataSet();
                ds = new TercerCasoSocioBL().ProcesarTercerCasoSocio(oEntity);
                if (ds.Tables[0].Rows.Count == 1)
                {
                    _IdSocio_Beneficiario    = ds.Tables[0].Rows[0]["RazonSocial"].ToString();
                    _IdSocio_BeneficiarioRuc = ds.Tables[0].Rows[0]["Ruc"].ToString();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #6
0
 public DataSet ProcesarTercerCasoSocio(TercerCasoSocioBE BE)
 {
     return(TercerCasoSocioDA.ProcesarTercerCasoSocio(BE));
 }