Пример #1
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)
            {
                Log oLog = new Log();
                oLog.IdUsuario = oIsUsuario.CodUsuario;
                oLog.ObsLog    = "REPORTE DE VALIJAS VALIDADAS";
                oLog.CodEvtLog = "2";
                oLog.AppLog    = "ANTALIS";
                oLog.putLog();

                DBConn oConn = new DBConn();
                if (oConn.Open())
                {
                    cAntCentrosDistribucion oCentrosDistribucion = new cAntCentrosDistribucion(ref oConn);
                    oCentrosDistribucion.CodUsuario = oIsUsuario.CodUsuario;
                    DataTable dtCntDst = oCentrosDistribucion.GetCentrosDistByUsuario();
                    if (dtCntDst != null)
                    {
                        if (dtCntDst.Rows.Count > 0)
                        {
                            if (dtCntDst.Rows.Count > 1)
                            {
                                cmb_centrodistribucion.Items.Add(new ListItem("<< Seleccione una opcion >>", ""));
                            }

                            foreach (DataRow oRow in dtCntDst.Rows)
                            {
                                cmb_centrodistribucion.Items.Add(new ListItem(oRow["descripcion"].ToString(), oRow["cod_centrodist"].ToString()));
                            }
                        }
                        else
                        {
                            cmb_centrodistribucion.Items.Add(new ListItem("No existen centros de distribución asociados", ""));
                            cmb_centrodistribucion.Enabled = false;
                        }
                    }
                    dtCntDst = null;
                }
                oConn.Close();

                onLoadGrid();
            }
        }
Пример #2
0
        protected void rdUsuarios_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            DBConn oConn = new DBConn();

            if (oConn.Open())
            {
                cAntCentrosDistribucion oCentrosDistribucion = new cAntCentrosDistribucion(ref oConn);
                oCentrosDistribucion.CodUsuario = CodUsuario.Value;
                rdUsuarios.DataSource           = oCentrosDistribucion.GetCentrosDistByUsuario();
            }
        }
Пример #3
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;
                }
            }
        }
Пример #4
0
        protected void rdCentrosDistribucion_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            DBConn oConn = new DBConn();

            if (oConn.Open())
            {
                cAntCentrosDistribucion oCentrosDistribucion = new cAntCentrosDistribucion(ref oConn);
                oCentrosDistribucion.CodUsuario  = CodUsuario.Value;
                oCentrosDistribucion.CodTblDatos = "CENDIS";
                if (!string.IsNullOrEmpty(txtBuscaCentros.Text))
                {
                    oCentrosDistribucion.Descripcion = txtBuscaCentros.Text;
                }
                rdCentrosDistribucion.DataSource = oCentrosDistribucion.Get();

                oConn.Close();
            }
        }
Пример #5
0
 protected void rdCentrosDistribucion_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
 {
     switch (e.CommandName)
     {
     case "cmdAgregar":
         string CodCentroDist = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["valor"].ToString();
         DBConn oConn         = new DBConn();
         if (oConn.Open())
         {
             cAntCentrosDistribucion oCentrosDistribucion = new cAntCentrosDistribucion(ref oConn);
             oCentrosDistribucion.CodUsuario    = CodUsuario.Value;
             oCentrosDistribucion.CodCentroDist = CodCentroDist;
             oCentrosDistribucion.Accion        = "CREAR";
             oCentrosDistribucion.Put();
             oConn.Close();
         }
         rdUsuarios.Rebind();
         rdCentrosDistribucion.Rebind();
         break;
     }
 }
Пример #6
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();
        }
Пример #7
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();
            }
        }
Пример #9
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)
            {
                Log oLog = new Log();
                oLog.IdUsuario = oIsUsuario.CodUsuario;
                oLog.ObsLog    = "REPORTE DE VALIJAS A VALIDAR";
                oLog.CodEvtLog = "2";
                oLog.AppLog    = "ANTALIS";
                oLog.putLog();

                DBConn oConn = new DBConn();
                if (oConn.Open())
                {
                    cAntCentrosDistribucion oCentrosDistribucion = new cAntCentrosDistribucion(ref oConn);
                    oCentrosDistribucion.CodUsuario = oIsUsuario.CodUsuario;
                    DataTable dtCntDst = oCentrosDistribucion.GetCentrosDistByUsuario();
                    if (dtCntDst != null)
                    {
                        if (dtCntDst.Rows.Count > 0)
                        {
                            if (dtCntDst.Rows.Count > 1)
                            {
                                cmb_centrodistribucion.Items.Add(new ListItem("<< Seleccione una opcion >>", ""));
                            }

                            foreach (DataRow oRow in dtCntDst.Rows)
                            {
                                cmb_centrodistribucion.Items.Add(new ListItem(oRow["descripcion"].ToString(), oRow["cod_centrodist"].ToString()));
                            }
                        }
                        else
                        {
                            cmb_centrodistribucion.Items.Add(new ListItem("No existen centros de distribución asociados", ""));
                            cmb_centrodistribucion.Enabled = false;
                        }
                    }
                    dtCntDst = null;

                    cAntUsrTiposPago oAntUsrTiposPago = new cAntUsrTiposPago(ref oConn);
                    oAntUsrTiposPago.CodUsuario = oIsUsuario.CodUsuario;
                    DataTable dtUsrTiposPago = oAntUsrTiposPago.Get();
                    if (dtUsrTiposPago != null)
                    {
                        if (dtUsrTiposPago.Rows.Count > 0)
                        {
                            foreach (DataRow oRow in dtUsrTiposPago.Rows)
                            {
                                if (oRow["tipo_pago"].ToString() == "1")
                                {
                                    cmb_documento.Items.Add(new ListItem("Cheque al día", "1"));
                                }
                                if (oRow["tipo_pago"].ToString() == "2")
                                {
                                    cmb_documento.Items.Add(new ListItem("Cheque al fecha", "2"));
                                }
                                if (oRow["tipo_pago"].ToString() == "3")
                                {
                                    cmb_documento.Items.Add(new ListItem("Efectivo", "3"));
                                }
                                if (oRow["tipo_pago"].ToString() == "4")
                                {
                                    cmb_documento.Items.Add(new ListItem("Letra", "4"));
                                }
                                if (oRow["tipo_pago"].ToString() == "5")
                                {
                                    cmb_documento.Items.Add(new ListItem("Tarjeta", "5"));
                                }
                                if (oRow["tipo_pago"].ToString() == "6")
                                {
                                    cmb_documento.Items.Add(new ListItem("Transferencia", "6"));
                                }
                            }
                        }
                    }
                    dtUsrTiposPago = null;

                    //cAntsUsuarios oUsuarios = new cAntsUsuarios(ref oConn);
                    //oUsuarios.CodUsuario = oIsUsuario.CodUsuario;
                    //oUsuarios.CodRol = "2";
                    //DataTable dt = oUsuarios.GetRoles();
                    //if (dt != null)
                    //{
                    //  if (dt.Rows.Count > 0)
                    //  {
                    //    hdd_tipo_controller.Value = dt.Rows[0]["tipo"].ToString();
                    //    switch (hdd_tipo_controller.Value)
                    //    {
                    //      case "E":
                    //        cmb_documento.Items.Add(new ListItem("Efectivo", "3"));
                    //        cmb_documento.Items.Add(new ListItem("Tarjeta", "5"));
                    //        cmb_documento.Items.Add(new ListItem("Transferencia", "6"));
                    //        break;

                    //      case "C":
                    //        cmb_documento.Items.Add(new ListItem("Cheque al día", "1"));
                    //        cmb_documento.Items.Add(new ListItem("Cheque al fecha", "2"));
                    //        cmb_documento.Items.Add(new ListItem("Letra", "4"));
                    //        break;
                    //    }
                    //  }
                    //}
                    //dt = null;
                }
                oConn.Close();

                onLoadGrid();
            }
        }