private void btnBuscar_Click(object sender, EventArgs e)
        {
            try
            {
                DataSet      ds           = new DataSet();
                SocioLineaBE SocioLineaBE = new SocioLineaBE()
                {
                    OPCION        = 1,
                    USUARIO       = General.General.GetUsuario,
                    IdSocio_Dsc   = TextBoxX1.Text.Trim(),
                    dtRegistro    = dtInicio.Value,
                    dtVencimiento = dtFin.Value
                };

                ds = SocioLineaBL.ProcesarSocioLinea(SocioLineaBE);
                dgvLineasAutorizadas.DataSource = ds.Tables[0];
                lblRegistros.Text = ds.Tables[0].Rows.Count.ToString() + " registro(s)";
                dt = ds.Tables[0];

                foreach (DataGridViewRow row in dgvLineasAutorizadas.Rows)
                {
                    if (Convert.ToInt32(row.Cells["nPorUsoLin"].Value) < 75)  // No Vencido
                    {
                    }
                    else // VEncido
                    {
                        row.DefaultCellStyle.ForeColor = Color.FromName(General.General.GetColorAnulado);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#2
0
        private void CargarDatos()
        {
            try
            {
                DataSet      ds            = new DataSet();
                SocioLineaBE oSocioLineaBE = new SocioLineaBE()
                {
                    OPCION  = 1,
                    USUARIO = General.General.GetCodigoUsuario,
                    IdLinea = IdLinea
                };

                ds = SocioLineaBL.ProcesarSocioLinea(oSocioLineaBE);

                if (ds.Tables[0].Rows.Count > 0)
                {
                    cboIdMoneda_tt.SelectedValue = ds.Tables[0].Rows[0]["IdMoneda_tt"].ToString() == "" ? "00036" : ds.Tables[0].Rows[0]["IdMoneda_tt"].ToString();
                    txtnLinea.Text      = Convert.ToDecimal(ds.Tables[0].Rows[0]["nImporte"]).ToString("N2");
                    txtnNuevaLinea.Text = Convert.ToDecimal(ds.Tables[0].Rows[0]["nImporte"]).ToString("N2");
                    if (Convert.ToDecimal(ds.Tables[0].Rows[0]["nImporte"]) > 0)
                    {
                        cboIdMoneda_tt.Enabled = false;
                    }
                    cboIdMoneda_tt_SelectedIndexChanged(new object(), new EventArgs());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#3
0
        private void frmConSaldoSocio2_Load(object sender, EventArgs e)
        {
            try
            {
                DataSet      ds           = new DataSet();
                SocioLineaBE SocioLineaBE = new SocioLineaBE()
                {
                    OPCION      = 8,
                    IdSocio     = txtCodigo.Text.Trim(),
                    IdSocio_Dsc = txtSocio.Text.Trim(),
                    USUARIO     = General.General.GetUsuario,
                };
                ds = SocioLineaBL.ProcesarSocioLinea(SocioLineaBE);
                dgvSaldoSocio.DataSource = ds.Tables[0];

                DataSet      ds2           = new DataSet();
                SocioLineaBE SocioLineaBE2 = new SocioLineaBE()
                {
                    OPCION      = 9,
                    IdSocio     = txtCodigo.Text.Trim(),
                    IdSocio_Dsc = txtSocio.Text.Trim(),
                    USUARIO     = General.General.GetUsuario,
                };
                ds = SocioLineaBL.ProcesarSocioLinea(SocioLineaBE2);
                dgvPagadora.DataSource = ds.Tables[0];

                lblEjecutivo.Text = "Ejecutivo: " + _Ejecutivo;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#4
0
        private void CargarDatos()
        {
            try
            {
                txtPagadora.Text = this.oPagadora;
                DataSet      ds           = new DataSet();
                SocioLineaBE SocioLineaBE = new SocioLineaBE()
                {
                    OPCION     = 10,
                    IdSocio    = this.oIdSocio,
                    IdPagadora = this.oIdPagadora,
                    USUARIO    = General.General.GetUsuario,
                    FlgOrigen  = _FlgOrigen
                };
                ds = SocioLineaBL.ProcesarSocioLinea(SocioLineaBE);
                dgvSaldoSocio3.DataSource = ds.Tables[0];

                decimal ACDolSol   = 0;
                decimal ACTotalSol = 0;
                foreach (DataGridViewRow row in dgvSaldoSocio3.Rows)
                {
                    if (row.Cells["DiasAtraso"].Value.Equals("")) // No Vencido
                    {
                    }
                    else // VEncido
                    {
                        row.DefaultCellStyle.ForeColor = Color.FromName(General.General.GetColorAnulado);
                    }

                    ACDolSol   = ACDolSol + Convert.ToDecimal(row.Cells["TotalD"].Value) * Convert.ToDecimal(row.Cells["nTipoCambio"].Value);
                    ACTotalSol = ACTotalSol + Convert.ToDecimal(row.Cells["TotalS"].Value);
                }
                decimal TotalUtilizado = 0;
                object  sumTotSol;
                object  sumTotDol;
                sumTotSol           = ds.Tables[0].Compute("Sum(TotalS)", "");
                sumTotDol           = ds.Tables[0].Compute("Sum(TotalD)", "");
                txtSumSol.Text      = string.Format(CultureInfo.CreateSpecificCulture("es-PE"), "{0:C}", sumTotSol);
                txtSumDol.Text      = string.Format(CultureInfo.CreateSpecificCulture("en-US"), "{0:C}", sumTotDol);
                txtTotalDolSol.Text = string.Format(CultureInfo.CreateSpecificCulture("es-PE"), "{0:C}", ACDolSol);

                TotalUtilizado          = (ACTotalSol + ACDolSol);
                txtTotalUtilizado.Text  = string.Format(CultureInfo.CreateSpecificCulture("es-PE"), "{0:C}", TotalUtilizado);
                txtLineaDisponible.Text = string.Format(CultureInfo.CreateSpecificCulture("es-PE"), "{0:C}", _LineaSaldo);
                Grid_Formatting();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#5
0
 private void btnBuscar_Click(object sender, EventArgs e)
 {
     try
     {
         DataSet      ds           = new DataSet();
         SocioLineaBE SocioLineaBE = new SocioLineaBE()
         {
             OPCION      = 7,
             IdSocio     = txtCodigo.Text.Trim(),
             IdSocio_Dsc = txtSocio.Text.Trim(),
             USUARIO     = General.General.GetUsuario,
         };
         ds = SocioLineaBL.ProcesarSocioLinea(SocioLineaBE);
         dgvSaldoSocio.DataSource = ds.Tables[0];
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }