예제 #1
0
        protected void idBuscar_Click(object sender, EventArgs e)
        {
            idGrilla.Visible = true;
            DBConn oConn = new DBConn();

            if (oConn.Open())
            {
                cCliente oCliente = new cCliente(ref oConn);
                oCliente.CodNkey = oIsUsuario.CodNkey;
                DataTable dtCliente = oCliente.GeCliente();
                if (dtCliente != null)
                {
                    if (dtCliente.Rows.Count > 0)
                    {
                        sNombre.Text = dtCliente.Rows[0]["cliente"].ToString();
                        sDirec.Text  = dtCliente.Rows[0]["direccion"].ToString();
                        sComuna.Text = dtCliente.Rows[0]["comuna"].ToString();
                        sRut.Text    = dtCliente.Rows[0]["Rut"].ToString() + " - " + dtCliente.Rows[0]["dv"].ToString();
                    }
                }
                dtCliente = null;

                cEjecutivo oEjecutivo = new cEjecutivo(ref oConn);
                oEjecutivo.CodNkey = oIsUsuario.CodNkey;
                DataTable dtEjecutivo = oEjecutivo.Get();
                if (dtEjecutivo != null)
                {
                    if (dtEjecutivo.Rows.Count > 0)
                    {
                        sEjeNombre.Text = dtEjecutivo.Rows[0]["Ejecutivo"].ToString();
                        sEjeFax.Text    = dtEjecutivo.Rows[0]["Fax"].ToString();
                        sTele.Text      = dtEjecutivo.Rows[0]["Telefono"].ToString();
                        sEMail.Text     = dtEjecutivo.Rows[0]["EMail"].ToString();
                    }
                }
                dtEjecutivo = null;
            }
            oConn.Close();

            rdGridCartola.Rebind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            oIsUsuario = oWeb.ValidaUserAppReport();
            oIsUsuario = oWeb.GetObjUsuario();

            DateTime dTimeNow = DateTime.Now;
            //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);

            DBConn oConn = new DBConn();

            if (!IsPostBack)
            {
                if (oConn.Open())
                {
                    string            arrNkeyCliente  = string.Empty;
                    SysClienteUsuario oClienteUsuario = new SysClienteUsuario(ref oConn);
                    oClienteUsuario.CodUsuario = oIsUsuario.CodUsuario;
                    DataTable dt = oClienteUsuario.Get();
                    if (dt != null)
                    {
                        foreach (DataRow dRow in dt.Rows)
                        {
                            arrNkeyCliente = (string.IsNullOrEmpty(arrNkeyCliente) ? dRow["nkey_user"].ToString() : arrNkeyCliente + "," + dRow["nkey_user"].ToString());
                        }

                        hdd_arrNkeyCliente.Value = arrNkeyCliente;
                    }
                    dt = null;

                    if (arrNkeyCliente.Split(',').Count() > 0)
                    {
                        hdd_cli_show.Value = "V";
                        bCliente           = true;
                        cCliente oCliente = new cCliente(ref oConn);
                        oCliente.ArrNkeyCliente = arrNkeyCliente;
                        dt = oCliente.GetClientes();

                        if (dt != null)
                        {
                            cmbCliente.Items.Add(new ListItem("<< Seleccione Cliente >>", string.Empty));
                            foreach (DataRow oRow in dt.Rows)
                            {
                                cmbCliente.Items.Add(new ListItem(oRow["snombre"].ToString(), oRow["nkey_cliente"].ToString()));
                            }
                        }
                        dt = null;

                        colClientes.Visible = true;
                    }

                    cDebtUsrAsignados oDebtUsrAsignados = new cDebtUsrAsignados(ref oConn);
                    oDebtUsrAsignados.CodUsuario  = oIsUsuario.CodUsuario;
                    oDebtUsrAsignados.CodConsulta = "23";
                    dt = oDebtUsrAsignados.Get();
                    if (dt != null)
                    {
                        if (dt.Rows.Count > 0)
                        {
                            bDeudor  = ((dt.Rows[0]["filtro_deudor"].ToString() == "V") ? true : false);
                            bHolding = ((dt.Rows[0]["filtro_holding"].ToString() == "V") ? true : false);
                        }
                    }
                    dt = null;

                    //if (bDeudor)
                    //  colDeudor.Visible = true;

                    if (bHolding)
                    {
                        colHolding.Visible = true;
                        cCliente oCliente = new cCliente(ref oConn);
                        oCliente.ArrNkeyCliente = arrNkeyCliente;
                        dt = oCliente.GetHolding();
                        if (dt != null)
                        {
                            if (dt.Rows.Count > 0)
                            {
                                cmbHolding.Visible = true;
                                cmbHolding.Items.Add(new ListItem("<< Seleccione Holding >>", string.Empty));
                                foreach (DataRow oRow in dt.Rows)
                                {
                                    cmbHolding.Items.Add(new ListItem(oRow["holding"].ToString(), oRow["ncodholding"].ToString()));
                                }
                            }
                        }
                    }

                    oConn.Close();
                }

                Log oLog = new Log();
                oLog.IdUsuario = oIsUsuario.CodUsuario;
                oLog.ObsLog    = "REPORTE CLIENTES RETENIDOS";
                oLog.CodEvtLog = "1";
                oLog.AppLog    = "REPORTES DEBTCONTROL";
                oLog.putLog();
            }

            if (oConn.Open())
            {
                if (!string.IsNullOrEmpty(cmbCliente.SelectedValue))
                {
                    cCliente oCliente = new cCliente(ref oConn);
                    oCliente.CodNkey = cmbCliente.SelectedValue;
                    DataTable dt = oCliente.GeCliente();
                    if (dt != null)
                    {
                        if (dt.Rows.Count > 0)
                        {
                            Signomoneda = dt.Rows[0]["signomoneda"].ToString().Trim();
                            Decimales   = dt.Rows[0]["decimales"].ToString();
                        }
                    }
                    dt = null;

                    if (!string.IsNullOrEmpty(Signomoneda))
                    {
                        lblmoneda.Text = "Montos expresados en " + Signomoneda;
                    }
                }

                oConn.Close();
            }
        }
예제 #3
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();
        }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            oIsUsuario = oWeb.ValidaUserAppReport();
            oIsUsuario = oWeb.GetObjUsuario();
            DateTime dTimeNow = DateTime.Now;
            //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);

            DBConn oConn = new DBConn();

            if (!IsPostBack)
            {
                if (oConn.Open())
                {
                    string            arrNkeyCliente  = string.Empty;
                    SysClienteUsuario oClienteUsuario = new SysClienteUsuario(ref oConn);
                    oClienteUsuario.CodUsuario = oIsUsuario.CodUsuario;
                    DataTable dt = oClienteUsuario.Get();
                    if (dt != null)
                    {
                        foreach (DataRow dRow in dt.Rows)
                        {
                            arrNkeyCliente = (string.IsNullOrEmpty(arrNkeyCliente) ? dRow["nkey_user"].ToString() : arrNkeyCliente + "," + dRow["nkey_user"].ToString());
                        }

                        hdd_arrNkeyCliente.Value = arrNkeyCliente;
                    }
                    dt = null;

                    if (arrNkeyCliente.Split(',').Count() > 0)
                    {
                        hdd_cli_show.Value = "V";
                        bCliente           = true;
                        cCliente oCliente = new cCliente(ref oConn);
                        oCliente.ArrNkeyCliente = arrNkeyCliente;
                        dt = oCliente.GetClientes();

                        if (dt != null)
                        {
                            cmbCliente.Items.Add(new ListItem("<< Seleccione Cliente >>", string.Empty));
                            foreach (DataRow oRow in dt.Rows)
                            {
                                cmbCliente.Items.Add(new ListItem(oRow["snombre"].ToString(), oRow["nkey_cliente"].ToString()));
                            }
                        }
                        dt = null;

                        colClientes.Visible = true;
                    }

                    oConn.Close();
                }

                RadDatePicker1.DateInput.DateFormat = "dd-MM-yyyy";
                RadDatePicker2.DateInput.DateFormat = "dd-MM-yyyy";
                RadDatePicker1.SelectedDate         = dTimeNow.AddMonths(-1);
                RadDatePicker2.SelectedDate         = dTimeNow;

                Log oLog = new Log();
                oLog.IdUsuario = oIsUsuario.CodUsuario;
                oLog.ObsLog    = "REPORTE DE COPIA CEDIBLE EN DEBTCONTROL";
                oLog.CodEvtLog = "1";
                oLog.AppLog    = "REPORTES DEBTCONTROL";
                oLog.putLog();
            }

            if (oConn.Open())
            {
                if (!string.IsNullOrEmpty(cmbCliente.SelectedValue))
                {
                    cCliente oCliente = new cCliente(ref oConn);
                    oCliente.CodNkey = cmbCliente.SelectedValue;
                    DataTable dt = oCliente.GeCliente();
                    if (dt != null)
                    {
                        if (dt.Rows.Count > 0)
                        {
                            Signomoneda = dt.Rows[0]["signomoneda"].ToString().Trim();
                            Decimales   = dt.Rows[0]["decimales"].ToString();
                        }
                    }
                    dt = null;

                    if (!string.IsNullOrEmpty(Signomoneda))
                    {
                        lblmoneda.Text = "Montos expresados en " + Signomoneda;
                    }
                }

                oConn.Close();
            }
        }
        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();
            }
        }