Exemplo n.º 1
0
        protected void gdPagos_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                string sCodCentroDist = e.Row.Cells[2].Text.ToString();
                string sTipoDocumento = e.Row.Cells[3].Text.ToString();

                DBConn oConn = new DBConn();
                if (oConn.Open())
                {
                    cAntCentrosDistribucion oCentrosDistribucion = new cAntCentrosDistribucion(ref oConn);
                    oCentrosDistribucion.CodCentroDist = sCodCentroDist;
                    DataTable dt = oCentrosDistribucion.GetByCod();
                    if (dt != null)
                    {
                        if (dt.Rows.Count > 0)
                        {
                            e.Row.Cells[2].Text = dt.Rows[0]["descripcion"].ToString();
                        }
                    }
                    dt = null;
                }
                oConn.Close();

                switch (sTipoDocumento)
                {
                case "1":
                    e.Row.Cells[3].Text = "CHEQUE AL DIA";
                    break;

                case "2":
                    e.Row.Cells[3].Text = "CHEQUE A FECHA";
                    break;

                case "3":
                    e.Row.Cells[3].Text = "EFECTIVO";
                    break;

                case "4":
                    e.Row.Cells[3].Text = "LETRA";
                    break;

                case "5":
                    e.Row.Cells[3].Text = "TARJETA";
                    break;

                case "6":
                    e.Row.Cells[3].Text = "TRANSFERENCIA";
                    break;
                }
            }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            oIsUsuario = oWeb.ValidaUserAppReport();
            //getMenu(idReportePago, oIsUsuario.CodUsuario, "1");
            //getMenu(idProcesoSeguimiento, oIsUsuario.CodUsuario, "2");
            //getMenu(idCartolas, oIsUsuario.CodUsuario, "3");
            //getMenu(idProcesoNormalizacion, oIsUsuario.CodUsuario, "4");
            //getMenu(idIndicadoresClaves, oIsUsuario.CodUsuario, "5");
            //getMenu(IndClasificacionRiesgo, oIsUsuario.CodUsuario, "6");

            //getMenuAntalis(indAntalis, oIsUsuario.CodUsuario);

            if (!IsPostBack)
            {
                hdd_cod_pago.Value = oWeb.GetData("CodPago");
                DBConn oConn = new DBConn();
                if (oConn.Open())
                {
                    cAntPagos oPagos = new cAntPagos(ref oConn);
                    oPagos.CodPagos = hdd_cod_pago.Value;
                    DataTable dt = oPagos.Get();
                    if (dt != null)
                    {
                        if (dt.Rows.Count > 0)
                        {
                            lblValija.Text = "# Valija " + dt.Rows[0]["cod_pago"].ToString();

                            cCliente oCliente = new cCliente(ref oConn);
                            oCliente.CodNkey = dt.Rows[0]["nkey_cliente"].ToString();
                            DataTable dtCliente = oCliente.GeCliente();
                            if (dtCliente != null)
                            {
                                if (dtCliente.Rows.Count > 0)
                                {
                                    lblRazonSocial.Text = dtCliente.Rows[0]["cliente"].ToString();
                                }
                            }
                            dtCliente = null;

                            cAntCentrosDistribucion oCentrosDistribucion = new cAntCentrosDistribucion(ref oConn);
                            oCentrosDistribucion.CodCentroDist = dt.Rows[0]["cod_centrodist"].ToString();
                            DataTable dtCentro = oCentrosDistribucion.GetByCod();
                            if (dtCentro != null)
                            {
                                if (dtCentro.Rows.Count > 0)
                                {
                                    lblCentroDistribucion.Text = dtCentro.Rows[0]["descripcion"].ToString();
                                }
                            }
                            dtCentro = null;

                            lblFecharecepcion.Text   = dt.Rows[0]["fech_recepcion"].ToString();
                            hdd_tipo_documento.Value = dt.Rows[0]["cod_tipo_pago"].ToString();
                            string lblTitulo = string.Empty;
                            switch (dt.Rows[0]["cod_tipo_pago"].ToString())
                            {
                            case "1":
                                lblTitulo = "VALIDACIÓN DE RECAUDACIÓN DE PAGOS / CHEQUES AL DÍA";
                                break;

                            case "2":
                                lblTitulo = "VALIDACIÓN DE RECAUDACIÓN DE PAGOS / CHEQUES A FECHA";
                                break;

                            case "4":
                                lblTitulo = "VALIDACIÓN DE RECAUDACIÓN DE PAGOS / LETRA";
                                break;

                            case "5":
                                lblTitulo = "VALIDACIÓN DE RECAUDACIÓN DE PAGOS / TARJETA";
                                break;

                            case "6":
                                lblTitulo = "VALIDACIÓN DE RECAUDACIÓN DE PAGOS / TRANSFERENCIA";
                                break;
                            }
                            lblTitle.Text = lblTitulo;
                        }
                    }
                    dt = null;
                }
                oConn.Close();

                Log oLog = new Log();
                oLog.IdUsuario = oIsUsuario.CodUsuario;
                oLog.ObsLog    = "VALIDACION VALIJA #" + hdd_cod_pago.Value;
                oLog.CodEvtLog = "2";
                oLog.AppLog    = "ANTALIS";
                oLog.putLog();
            }

            onLoadGrid();
        }
Exemplo n.º 3
0
        protected void gdPagos_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                foreach (DataControlFieldCell cell in e.Row.Cells)
                {
                    foreach (Control control in cell.Controls)
                    {
                        LinkButton lnkBtnDelete = control as LinkButton;
                        if (lnkBtnDelete != null && lnkBtnDelete.CommandName == "Delete")
                        {
                            lnkBtnDelete.Attributes.Add("onclick", "javascript:return confirm('Esta seguro de eliminar este pago?');");
                        }
                    }
                }

                string sCodCentroDist = e.Row.Cells[3].Text.ToString();
                string sTipoDocumento = e.Row.Cells[4].Text.ToString();
                string sEstado        = e.Row.Cells[6].Text.ToString();

                DBConn oConn = new DBConn();
                if (oConn.Open())
                {
                    cAntCentrosDistribucion oCentrosDistribucion = new cAntCentrosDistribucion(ref oConn);
                    oCentrosDistribucion.CodCentroDist = sCodCentroDist;
                    DataTable dt = oCentrosDistribucion.GetByCod();
                    if (dt != null)
                    {
                        if (dt.Rows.Count > 0)
                        {
                            e.Row.Cells[3].Text = dt.Rows[0]["descripcion"].ToString();
                        }
                    }
                    dt = null;
                }
                oConn.Close();

                switch (sTipoDocumento)
                {
                case "1":
                    e.Row.Cells[4].Text = "CHEQUE AL DIA";
                    break;

                case "2":
                    e.Row.Cells[4].Text = "CHEQUE A FECHA";
                    break;

                case "3":
                    e.Row.Cells[4].Text = "EFECTIVO";
                    break;

                case "4":
                    e.Row.Cells[4].Text = "LETRA";
                    break;

                case "5":
                    e.Row.Cells[4].Text = "TARJETA";
                    break;

                case "6":
                    e.Row.Cells[4].Text = "TRANSFERENCIA";
                    break;
                }

                if (sEstado == "A")
                {
                    e.Row.Cells[6].Text = "ABIERTO";
                }
                else
                {
                    e.Row.Cells[6].Text = "CERRADO";
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            oIsUsuario = oWeb.ValidaUserAppReport();
            //getMenu(idReportePago, oIsUsuario.CodUsuario, "1");
            //getMenu(idProcesoSeguimiento, oIsUsuario.CodUsuario, "2");
            //getMenu(idCartolas, oIsUsuario.CodUsuario, "3");
            //getMenu(idProcesoNormalizacion, oIsUsuario.CodUsuario, "4");
            //getMenu(idIndicadoresClaves, oIsUsuario.CodUsuario, "5");
            //getMenu(IndClasificacionRiesgo, oIsUsuario.CodUsuario, "6");

            //getMenuAntalis(indAntalis, oIsUsuario.CodUsuario);

            if (!IsPostBack)
            {
                hdd_cod_pago.Value = oWeb.GetData("CodPago");

                DBConn oConn = new DBConn();
                if (oConn.Open())
                {
                    cAntPagos oPagos = new cAntPagos(ref oConn);
                    oPagos.CodPagos = hdd_cod_pago.Value;
                    DataTable dt = oPagos.Get();
                    if (dt != null)
                    {
                        if (dt.Rows.Count > 0)
                        {
                            lblValija.Text = "# Valija " + dt.Rows[0]["cod_pago"].ToString();

                            cCliente oCliente = new cCliente(ref oConn);
                            oCliente.CodNkey = dt.Rows[0]["nkey_cliente"].ToString();
                            DataTable dtCliente = oCliente.GeCliente();
                            if (dtCliente != null)
                            {
                                if (dtCliente.Rows.Count > 0)
                                {
                                    lblRazonSocial.Text = dtCliente.Rows[0]["cliente"].ToString();
                                }
                            }
                            dtCliente = null;

                            cAntDocumentosPago oDocPago = new cAntDocumentosPago(ref oConn);
                            oDocPago.CodPagos = hdd_cod_pago.Value;
                            DataTable dtDocPago = oDocPago.Get();
                            if (dtDocPago != null)
                            {
                                if (dtDocPago.Rows.Count > 0)
                                {
                                    lblNomDeudor.Text = dtDocPago.Rows[0]["nom_deudor"].ToString();
                                }
                                dtDocPago = null;
                            }

                            cAntCentrosDistribucion oCentrosDistribucion = new cAntCentrosDistribucion(ref oConn);
                            oCentrosDistribucion.CodCentroDist = dt.Rows[0]["cod_centrodist"].ToString();
                            DataTable dtCentro = oCentrosDistribucion.GetByCod();
                            if (dtCentro != null)
                            {
                                if (dtCentro.Rows.Count > 0)
                                {
                                    lblCentroDistribucion.Text = dtCentro.Rows[0]["descripcion"].ToString();
                                }
                            }
                            dtCentro = null;

                            lblFecharecepcion.Text = dt.Rows[0]["fech_recepcion"].ToString();
                            lblimporte.Text        = string.Format("{0:N0}", int.Parse(dt.Rows[0]["importe_total"].ToString()));
                            hdd_importe.Value      = dt.Rows[0]["importe_total"].ToString();
                        }
                    }
                    dt = null;
                }
                oConn.Close();

                Log oLog = new Log();
                oLog.IdUsuario = oIsUsuario.CodUsuario;
                oLog.ObsLog    = "VALIDACION VALIJA #" + hdd_cod_pago.Value;
                oLog.CodEvtLog = "2";
                oLog.AppLog    = "ANTALIS";
                oLog.putLog();
            }
        }