Exemplo n.º 1
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);

            if (!IsPostBack)
            {
                rdCmbBoxMeses.Items.FindByValue(dTimeNow.AddMonths(-1).Month.ToString()).Selected = true;
                tdTxtAno.Text = DateTime.Now.Year.ToString();

                Log oLog = new Log();
                oLog.IdUsuario = oIsUsuario.CodUsuario;
                oLog.ObsLog    = "REPORTE DE CARTOLA";
                oLog.CodEvtLog = "1";
                oLog.AppLog    = "REPORTES DEBTCONTROL";
                oLog.putLog();
            }
        }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     FileUploadImg.Attributes["onChange"] = "getStats('" + dispName.ClientID + "',this.value);";
     oIsUsuario = oWeb.GetObjUsuario();
     if (!IsPostBack)
     {
         StringBuilder sPath = new StringBuilder();
         sPath.Append(Server.MapPath(".")).Append(@"\binary\").Append("UserArchivo_").Append(oIsUsuario.CodUsuario).Append(".bin");
         if (File.Exists(sPath.ToString()))
         {
             DataTable dFile = oWeb.DeserializarTbl(Server.MapPath("."), "UserArchivo_" + oIsUsuario.CodUsuario + ".bin");
             if (dFile != null)
             {
                 if (dFile.Rows.Count > 0)
                 {
                     DataRow[] oRow = dFile.Select(" tip_archivo = 'P' ");
                     if (oRow.Count() > 0)
                     {
                         hddCodUsrImgFileProfile.Value = oRow[0]["cod_archivo"].ToString();
                     }
                     oRow = null;
                 }
             }
             dFile = null;
         }
     }
 }
Exemplo n.º 3
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);

            if (!IsPostBack)
            {
                Log oLog = new Log();
                oLog.IdUsuario = oIsUsuario.CodUsuario;
                oLog.ObsLog    = "REPORTE DE CUENTA CORRIENTE";
                oLog.CodEvtLog = "1";
                oLog.AppLog    = "REPORTES DEBTCONTROL";
                oLog.putLog();
            }
        }
Exemplo n.º 4
0
 private void ORecButton_Click(object sender, EventArgs e)
 {
     oIsUsuario = oWeb.GetObjUsuario();
     Session["CodContenido"] = string.Empty;
     Session["CodNodo"]      = (sender as LinkButton).Attributes["CodNodo"].ToString();
     if ((sender as LinkButton).Attributes["IndDesplUsrClient"].ToString() != "V")
     {
         if ((sender as LinkButton).Attributes["IndPerfil"].ToString() == "V")
         {
             Session["CodUsuarioPerfil"] = oIsUsuario.CodUsuario;
         }
         else
         {
             Session["CodUsuarioPerfil"] = string.Empty;
         }
     }
     if (string.IsNullOrEmpty(sRuta))
     {
         Page.Response.Redirect(".");
     }
     else
     {
         Page.Response.Redirect("../default.aspx");
     }
 }
Exemplo n.º 5
0
        protected void btnAceptar_Click(object sender, EventArgs e)
        {
            DataRow[] oRow;
            oIsUsuario = oWeb.GetObjUsuario();
            Session["CodUsuarioPerfil"] = oIsUsuario.CodUsuario;

            DataTable oNodos = oWeb.DeserializarTbl(Server.MapPath("."), "Nodos.bin");

            if (oNodos != null)
            {
                if (oNodos.Rows.Count > 0)
                {
                    oRow = oNodos.Select(" pf_nodo = 'V' ");
                    if (oRow != null)
                    {
                        if (oRow.Count() > 0)
                        {
                            Session["CodNodo"] = oRow[0]["cod_nodo"].ToString();
                        }
                    }
                    oRow = null;
                }
            }
            oNodos = null;

            Page.Response.Redirect(".");
        }
Exemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            oIsUsuario = oWeb.ValidaUserAppReport();

            lbl_lomasvistopor.Text = "Lo más visto por \"" + oIsUsuario.Nombres + "\"";

            getMenu(zone_dashboard, oIsUsuario.CodUsuario, "0", false, true);
            getMenu(idReportePago, oIsUsuario.CodUsuario, "1", true, false);
            getMenu(idProcesoSeguimiento, oIsUsuario.CodUsuario, "2", true, false);
            getMenu(idCartolas, oIsUsuario.CodUsuario, "3", true, false);
            getMenu(idProcesoNormalizacion, oIsUsuario.CodUsuario, "4", true, false);
            getMenu(idIndicadoresClaves, oIsUsuario.CodUsuario, "5", true, false);
            getMenu(IndClasificacionRiesgo, oIsUsuario.CodUsuario, "6", true, false);

            getMenuAntalis(indAntalis, oIsUsuario.CodUsuario);

            getLast20Request();

            get20MostRequest();

            getMasValoradoPorLaGerencia();

            getVisionDeCompania();

            getAnalizandoClientesDiaADia();
        }
Exemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            oIsUsuario = oWeb.GetObjUsuario();
            pCodNodo   = Session["CodNodo"].ToString();
            if (((HttpContext.Current.Session["USUARIO"] != null) && (!string.IsNullOrEmpty(HttpContext.Current.Session["USUARIO"].ToString()))) || ((Session["CodUsuarioPerfil"] != null) && (!string.IsNullOrEmpty(Session["CodUsuarioPerfil"].ToString()))))
            {
                if (!string.IsNullOrEmpty(this.Attributes["Method"].ToString()))
                {
                    switch (this.Attributes["Method"].ToString())
                    {
                    case "Comment":
                        if ((!string.IsNullOrEmpty(oIsUsuario.Tipo)) && (int.Parse(oIsUsuario.Tipo) > 1))
                        {
                            putCommentToUser();
                        }
                        break;

                    case "GetComments":
                        getComments();
                        break;

                    case "CommentToUser":
                        CommentToUser();
                        break;
                    }
                }
            }
        }
Exemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            bool blnUsuario = false;

            oIsUsuario = oWeb.GetObjUsuario();
            if ((Session["CodUsuarioPerfil"] != null) && (!string.IsNullOrEmpty(Session["CodUsuarioPerfil"].ToString())) && (!string.IsNullOrEmpty(oIsUsuario.CodUsuario)))
            {
                BinaryUsuario dUsuario = new BinaryUsuario();
                SysUsuario    oUsuario = new SysUsuario();
                oUsuario.Path       = Server.MapPath(".");
                oUsuario.CodUsuario = Session["CodUsuarioPerfil"].ToString();
                dUsuario            = oUsuario.ClassGet();
                if (dUsuario != null)
                {
                    if (dUsuario.CodTipo != "1")
                    {
                        blnUsuario          = true;
                        RdRankingUSer.Value = (!string.IsNullOrEmpty(dUsuario.NotaRanking) ? decimal.Parse(dUsuario.NotaRanking) : 0);
                    }
                }
                dUsuario = null;

                if (blnUsuario)
                {
                    DataTable oRanking = oWeb.DeserializarTbl(Server.MapPath("."), "Ranking.bin");
                    if (oRanking != null)
                    {
                        if (oRanking.Rows.Count > 0)
                        {
                            DataRow[] oRows = oRanking.Select("cod_usuario =" + Session["CodUsuarioPerfil"].ToString() + " and cod_cliente =" + oIsUsuario.CodUsuario + " and fch_ranking >= '" + DateTime.Now.AddDays(-10).ToString("yyyy-MM-dd HH:mm:ss") + "'");
                            if (oRows != null)
                            {
                                if (oRows.Count() == 0)
                                {
                                    HyperLink1.Visible     = true;
                                    HyperLink1.NavigateUrl = "ranking.aspx?CodUsuario=" + Session["CodUsuarioPerfil"].ToString();
                                }
                            }
                            oRows = null;
                        }
                        else
                        {
                            HyperLink1.Visible     = true;
                            HyperLink1.NavigateUrl = "ranking.aspx?CodUsuario=" + Session["CodUsuarioPerfil"].ToString();
                        }
                    }
                    oRanking = null;

                    HyperLink2.NavigateUrl = "ranking.aspx?CodUsuario=" + Session["CodUsuarioPerfil"].ToString() + "&H=t";
                    HyperLink3.NavigateUrl = "recomiendame.aspx?CodUsuario=" + Session["CodUsuarioPerfil"].ToString();
                }
                else
                {
                    RdRankingUSer.Visible = false;
                    HyperLink1.Visible    = false;
                    HyperLink2.Visible    = false;
                    HyperLink3.Visible    = false;
                }
            }
        }
Exemplo n.º 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if ((Session["USUARIO"] != null) && (!string.IsNullOrEmpty(Session["USUARIO"].ToString())))
            {
                oIsUsuario = oWeb.GetObjUsuario();
                if (!string.IsNullOrEmpty(this.Attributes["Method"].ToString()))
                {
                    switch (this.Attributes["Method"].ToString())
                    {
                    case "FriendRequest":
                        if (oIsUsuario.Tipo == "1")
                        {
                            pCodUsuarioRel = this.Attributes["CodUsuarioRel"].ToString();
                            if ((Session["USUARIO"] != null) && (!string.IsNullOrEmpty(Session["USUARIO"].ToString())) && (pCodUsuarioRel != oIsUsuario.CodUsuario))
                            {
                                putFriendRequest();
                            }
                        }
                        break;

                    case "ConfirmFriendRequest":
                        putConfirmFriendRequest();
                        break;
                    }
                }
            }
        }
Exemplo n.º 10
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);

            if (!IsPostBack)
            {
                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 MOVIMIENTOS CARGADOS CARTOLA";
                oLog.CodEvtLog = "1";
                oLog.AppLog    = "REPORTES DEBTCONTROL";
                oLog.putLog();
            }
        }
Exemplo n.º 11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     oIsUsuario = oWeb.GetObjUsuario();
     if (!IsPostBack)
     {
         hdd_arrNkeyCliente.Value = oWeb.GetData("ArrCodCliente");
     }
 }
Exemplo n.º 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            bool bEnable = false;

            oIsUsuario = oWeb.ValidaUserAppReport();

            if ((!string.IsNullOrEmpty(oIsUsuario.NKeyDeudor)) && (!string.IsNullOrEmpty(oIsUsuario.NKeyUsuario)) || (!string.IsNullOrEmpty(oIsUsuario.NCodHolding)))
            {
                DBConn oConn = new DBConn();
                if (oConn.Open())
                {
                    cDashboard oGestiones = new cDashboard(ref oConn);
                    oGestiones.nKeyCliente = oIsUsuario.NKeyUsuario;
                    oGestiones.nKeyDeudor  = oIsUsuario.NKeyDeudor;
                    oGestiones.CodHolding  = oIsUsuario.NCodHolding;
                    //Response.Write("GetGestiones;" + DateTime.Now.Millisecond.ToString() + "<br>");
                    DataTable dt = oGestiones.GetGestiones();
                    //Response.Write("GetGestiones;" + DateTime.Now.Millisecond.ToString() + "<br>");
                    if (dt != null)
                    {
                        if (dt.Rows.Count > 0)
                        {
                            bEnable = true;
                            gdGestiones.DataSource = dt;
                            gdGestiones.DataBind();
                        }
                        else
                        {
                            bEnable = false;
                            getDummyTable();
                        }
                    }
                    else
                    {
                        bEnable = false;
                        getDummyTable();
                    }
                }
                oConn.Close();

                if (bEnable)
                {
                    idGestionesEnable.Visible   = true;
                    idGestionesNoEnable.Visible = false;
                }
                else
                {
                    idGestionesEnable.Visible   = false;
                    idGestionesNoEnable.Visible = true;
                }
            }
            else
            {
                idGestionesEnable.Visible   = false;
                idGestionesNoEnable.Visible = false;
            }
        }
Exemplo n.º 13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            oIsUsuario = oWeb.ValidaUserAppReport();
            if ((!string.IsNullOrEmpty(oIsUsuario.NKeyDeudor)) && (!string.IsNullOrEmpty(oIsUsuario.NKeyUsuario)) || (!string.IsNullOrEmpty(oIsUsuario.NCodHolding)))
            {
                DBConn oConn = new DBConn();
                if (oConn.Open())
                {
                    cDashboard oHistDBT = new cDashboard(ref oConn);
                    oHistDBT.nKeyCliente = oIsUsuario.NKeyUsuario;
                    oHistDBT.nKeyDeudor  = oIsUsuario.NKeyDeudor;
                    oHistDBT.CodHolding  = oIsUsuario.NCodHolding;
                    //Response.Write("GetDBT;" + DateTime.Now.Millisecond.ToString() + "<br>");
                    DataTable dt = oHistDBT.GetDBT();
                    //Response.Write("GetDBT;" + DateTime.Now.Millisecond.ToString() + "<br>");
                    if (dt != null)
                    {
                        if (dt.Rows.Count > 0)
                        {
                            string sMes   = string.Empty;
                            string sMeses = string.Empty;
                            string sDBT   = string.Empty;
                            string sData  = "['Meses','Días', { role: 'annotation' } ]";
                            foreach (DataRow oRow in dt.Rows)
                            {
                                sMes  = oRow["periodo"].ToString().Trim();
                                sData = sData + ",['" + sMes + "'," + Math.Round(double.Parse(oRow["dbt"].ToString()), 0).ToString() + ",'" + Math.Round(double.Parse(oRow["dbt"].ToString()), 0).ToString("N0") + "']";
                            }

                            StringBuilder sHtml = new StringBuilder();
                            sHtml.Append(" google.charts.setOnLoadCallback(drawRightY); ");
                            sHtml.Append(" function drawRightY() { ");
                            sHtml.Append(" var data = google.visualization.arrayToDataTable([ ");
                            sHtml.Append(sData);
                            sHtml.Append(" ]); ");
                            sHtml.Append(" var materialOptions = { annotations: { alwaysOutside: true, textStyle: { fontSize: 12, auraColor: 'none', color: '#fff' }, boxStyle: { stroke: '#79B6CD', strokeWidth: 1, rx: 10, ry: 10, gradient: { color1: '#79B6CD', color2: '#79B6CD', x1: '0%', y1: '0%', x2: '100%', y2: '100%' } } }, legend: { position: 'top', textStyle: { color: '#c5c5c5', fontName: 'Lato', fontSize: 13, bold: true, } }, vAxis: { format: 'short', textStyle: { color: '#c5c5c5', fontName: 'Lato', fontSize: 12, bold: true } }, hAxis: { textStyle: { color: '#91BBDB', fontName: 'Lato', fontSize: 13, bold: true } }, colors: ['#A5E6FE', '#A5E6FE', '#A5E6FE', '#A5E6FE', '#A5E6FE'], bars: 'horizontal', axes: { y: { 0: { side: 'right' } } } }; ");
                            sHtml.Append(" var materialChart = new google.visualization.BarChart(document.getElementById('horizontalBar')); ");
                            sHtml.Append(" materialChart.draw(data, materialOptions); } ");

                            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "horizontalBar", sHtml.ToString(), true);
                        }
                    }
                    dt = null;

                    dt = oHistDBT.GetCondicionPago();
                    if (dt != null)
                    {
                        if (dt.Rows.Count > 0)
                        {
                            lb_sla_dbt.Text = dt.Rows[0]["condicion_pago"].ToString() + " días";
                        }
                    }
                    dt = null;
                }
                oConn.Close();
            }
        }
Exemplo n.º 14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     oIsUsuario = oWeb.GetObjUsuario();
     if (!IsPostBack)
     {
         lblLogin.Text    = oCulture.GetResource("LoginUsers", "lblLogin");
         lblPassword.Text = oCulture.GetResource("LoginUsers", "txtPassword");
         btnAceptar.Text  = oCulture.GetResource("Global", "btnAceptar");
     }
 }
Exemplo n.º 15
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();
            }
        }
Exemplo n.º 16
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);
        }
Exemplo n.º 17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     oIsUsuario       = oWeb.GetObjUsuario();
     CodUsuario.Value = oWeb.GetData("CodUsuario");
     if ((string.IsNullOrEmpty(oWeb.GetData("H"))) && (!string.IsNullOrEmpty(oIsUsuario.CodUsuario)))
     {
         putUserRanking();
     }
     else if (!string.IsNullOrEmpty(oWeb.GetData("H")))
     {
         H.Value = oWeb.GetData("H");
         getHistUserRanking();
     }
 }
Exemplo n.º 18
0
        protected void btnRstPpwd_Click(object sender, EventArgs e)
        {
            DBConn oConn = new DBConn();

            if (oConn.Open())
            {
                oConn.BeginTransaction();
                string     pCodUsuario = Session["USRCHANGEPWD"].ToString();
                string     sClave      = oWeb.Crypt(txtRstPwd01.Text);
                SysUsuario oUsuario    = new SysUsuario(ref oConn);
                oUsuario.CodUsuario = pCodUsuario;
                oUsuario.PwdUsuario = sClave;
                oUsuario.Accion     = "EDITAR";
                oUsuario.Put();
                if (string.IsNullOrEmpty(oUsuario.Error))
                {
                    string cPath = Server.MapPath(".") + @"\binary\";
                    oUsuario.SerializaTblUsuario(ref oConn, cPath, "Usuarios.bin");
                    string sFileUsr = "******" + pCodUsuario + ".bin";
                    oUsuario.SerializaUsuario(ref oConn, cPath, sFileUsr);

                    oConn.Commit();

                    context_rstpwd.Visible      = false;
                    context_olvpwd_resp.Visible = true;

                    DataTable dUsuario = oUsuario.Get();
                    if (dUsuario.Rows.Count > 0)
                    {
                        oIsUsuario            = oWeb.GetObjUsuario();
                        oIsUsuario.CodUsuario = pCodUsuario;
                        oIsUsuario.Tipo       = dUsuario.Rows[0]["cod_tipo"].ToString();
                        oIsUsuario.Nombres    = dUsuario.Rows[0]["nom_usuario"].ToString() + " " + dUsuario.Rows[0]["ape_usuario"].ToString();
                        oIsUsuario.Email      = dUsuario.Rows[0]["eml_usuario"].ToString();
                        oIsUsuario.Fono       = dUsuario.Rows[0]["fono_usuario"].ToString();
                        Session["USUARIO"]    = oIsUsuario;
                    }
                    dUsuario = null;

                    Session["USRCHANGEPWD"] = string.Empty;
                    lblmsnrstpwd_resp.Text  = oCulture.GetResource("Usuario", "MsnRstPwdResp");
                }
                oConn.Close();
            }
        }
Exemplo n.º 19
0
 protected void Page_Load(object sender, EventArgs e)
 {
     oIsUsuario = oWeb.GetObjUsuario();
     if (int.Parse(oIsUsuario.Tipo) == 1)
     {
         bloquemensaje.Visible  = true;
         bloquehistoria.Visible = true;
         bloqueusuarios.Visible = false;
         getHistoryEmails(Session["CodUsuarioPerfil"].ToString());
     }
     else
     {
         bloquemensaje.Visible  = false;
         bloquehistoria.Visible = false;
         bloqueusuarios.Visible = true;
         getMessageUser();
     }
 }
Exemplo n.º 20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                hdd_canal.Value = oWeb.GetData("hdd_canal");
                oIsUsuario      = oWeb.GetObjUsuario();

                if (hdd_canal.Value == "R")
                {
                    lblTitle.Text = "RUBROS";
                    rdTxtNombreDeudor.Attributes.Add("placeholder", "RUBROS");
                }
                else
                {
                    lblTitle.Text = "CANALES";
                    rdTxtNombreDeudor.Attributes.Add("placeholder", "CANALES");
                }
            }
        }
Exemplo n.º 21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            oIsUsuario = oWeb.GetObjUsuario();
            if (!IsPostBack)
            {
                lblLogin.Text         = oCulture.GetResource("LoginUsers", "lblLogin");
                lblPassword.Text      = oCulture.GetResource("LoginUsers", "txtPassword");
                chkRememberLogin.Text = oCulture.GetResource("LoginUsers", "lblRememberLogin");
                lnkOlvidoPass.Text    = oCulture.GetResource("LoginUsers", "lblOlvPassword");
                btnAceptar.Text       = oCulture.GetResource("Global", "btnAceptar");
            }

            if (oIsUsuario.CodUsuario != null)
            {
                if (oIsUsuario.CodUsuario != string.Empty)
                {
                    idCntrUsrLogin.Visible = false;
                }
            }
        }
Exemplo n.º 22
0
        protected void btnGrabar_Click(object sender, EventArgs e)
        {
            oIsUsuario = oWeb.GetObjUsuario();
            DBConn oConn = new DBConn();

            if (oConn.Open())
            {
                AppBanner oBanner = new AppBanner(ref oConn);
                oBanner.CodBanner  = CodBanner.Value;
                oBanner.NomBanner  = txtTituloBanner.Text;
                oBanner.TipoBanner = rdCmbTipoBanner.SelectedValue;
                oBanner.EstBanner  = rdCmbEstado.SelectedValue;
                oBanner.Accion     = (string.IsNullOrEmpty(CodBanner.Value) ? "CREAR" : "EDITAR");
                oBanner.Put();
                CodBanner.Value = oBanner.CodBanner;

                if (string.IsNullOrEmpty(oBanner.Error))
                {
                    oConn.Commit();
                    StringBuilder cPath = new StringBuilder();
                    cPath.Append(Server.MapPath(".")).Append(@"\binary\");
                    oBanner.CodBanner = string.Empty;
                    oBanner.SerializaBanner(ref oConn, cPath.ToString());
                    Image.Visible = true;

                    AppImgBanner oImgBanner = new AppImgBanner(ref oConn);
                    cPath = new StringBuilder();
                    cPath.Append(Server.MapPath(".")).Append(@"\binary\");
                    oImgBanner.SerializaImgBanner(ref oConn, cPath.ToString());
                }
                else
                {
                    oConn.Rollback();
                }
                oConn.Close();
            }
            rdImage.Rebind();
        }
Exemplo n.º 23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            oIsUsuario = oWeb.GetObjUsuario();
            objwin.Controls.Add(oControls.LoadRadWindow());

            if (!IsPostBack)
            {
                lblMisImagenes.Text = oCulture.GetResource("MisFotos", "lblMisImagenes");
                btnUpload.Text      = oCulture.GetResource("Usuario", "CargaFotos");
                if ((Session["CodUsuarioPerfil"] == null) || (Session["CodUsuarioPerfil"].ToString() != oIsUsuario.CodUsuario))
                {
                    btnUpload.Visible = false;
                }
            }
            else
            {
                if ((Session["ReloadImageUser"] != null) && (!string.IsNullOrEmpty(Session["ReloadImageUser"].ToString())))
                {
                    Session["ReloadImageUser"] = string.Empty;
                    rdUserImage.Rebind();
                }
            }
        }
Exemplo n.º 24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            oIsUsuario = oWeb.GetObjUsuario();
            if (!IsPostBack)
            {
                CodUsuario.Value = oWeb.GetData("CodUsuario");
                string sTitle = oCulture.GetResource("Contactenos", "lblTitleRecomiendame");
                if (string.IsNullOrEmpty(oIsUsuario.CodUsuario))
                {
                    lblNombre.Text = oCulture.GetResource("Contactenos", "TuNombre");
                }
                else
                {
                    txtNombreCliente.Visible = false;
                    txtNombre.Enabled        = false;
                }
                lblNombreAmigo.Text = oCulture.GetResource("Contactenos", "NombreAmigo");
                lblEmail.Text       = oCulture.GetResource("Contactenos", "EmailAmigo");
                lblComentario.Text  = oCulture.GetResource("Contactenos", "Comentario");
                BtnVolver.Text      = oCulture.GetResource("Global", "btnVolver");
                BtnVolverOK.Text    = oCulture.GetResource("Global", "btnVolver");
                BtnAceptar.Text     = oCulture.GetResource("Global", "btnAceptar");

                dUsuario            = new BinaryUsuario();
                oUsuario            = new SysUsuario();
                oUsuario.Path       = Server.MapPath(".");
                oUsuario.CodUsuario = CodUsuario.Value;
                dUsuario            = oUsuario.ClassGet();
                if (dUsuario != null)
                {
                    sTitle = sTitle.Replace("[NombreUsuario]", dUsuario.NomUsuario + " " + dUsuario.ApeUsuario);
                }
                dUsuario = null;

                lblCntTitle.Text = sTitle;
            }
        }
Exemplo n.º 25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Label olabel;

            if ((Session["USUARIO"] != null) && (!string.IsNullOrEmpty(Session["USUARIO"].ToString())))
            {
                oIsUsuario = oWeb.GetObjUsuario();
                switch (this.Attributes["Method"].ToString())
                {
                case "putFollow":
                    pCodSegUsuario = this.Attributes["CodSegUsuario"].ToString();
                    putFollow();
                    break;

                case "getFollow":
                    //Clientes == 1
                    Controls.Add(new LiteralControl("<div id=\"idSiguiendo\">"));
                    if (oIsUsuario.Tipo == "1")
                    {
                        olabel      = new Label();
                        olabel.Text = oCulture.GetResource("Usuario", "BtnFollowing");
                        Controls.Add(olabel);
                        Controls.Add(new LiteralControl("</div>"));
                        getFollow();
                    }
                    else
                    {
                        olabel      = new Label();
                        olabel.Text = oCulture.GetResource("Usuario", "lblFollowers");
                        Controls.Add(olabel);
                        Controls.Add(new LiteralControl("</div>"));
                        getFollowMe();
                    }
                    break;
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            oIsUsuario = oWeb.ValidaUserAppReport();

            getMenu(zone_dashboard, oIsUsuario.CodUsuario, "0", false, true);
            getMenu(idReportePago, oIsUsuario.CodUsuario, "1", true, false);
            getMenu(idProcesoSeguimiento, oIsUsuario.CodUsuario, "2", true, false);
            getMenu(idCartolas, oIsUsuario.CodUsuario, "3", true, false);
            getMenu(idProcesoNormalizacion, oIsUsuario.CodUsuario, "4", true, false);
            getMenu(idIndicadoresClaves, oIsUsuario.CodUsuario, "5", true, false);
            getMenu(IndClasificacionRiesgo, oIsUsuario.CodUsuario, "6", true, false);

            getMenuAntalis(indAntalis, oIsUsuario.CodUsuario);

            get20CliMenorCredibilidad();

            Log oLog = new Log();

            oLog.IdUsuario = oIsUsuario.CodUsuario;
            oLog.ObsLog    = "TOP 20 CLIENTES CON MENOR CREDIBILIDAD";
            oLog.CodEvtLog = "106";
            oLog.AppLog    = "TOP 20 CLIENTES CON MENOR CREDIBILIDAD";
            oLog.putLog();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            oIsUsuario = oWeb.ValidaUserAppReport();

            getMenu(zone_dashboard, oIsUsuario.CodUsuario, "0", false, true);
            getMenu(idReportePago, oIsUsuario.CodUsuario, "1", true, false);
            getMenu(idProcesoSeguimiento, oIsUsuario.CodUsuario, "2", true, false);
            getMenu(idCartolas, oIsUsuario.CodUsuario, "3", true, false);
            getMenu(idProcesoNormalizacion, oIsUsuario.CodUsuario, "4", true, false);
            getMenu(idIndicadoresClaves, oIsUsuario.CodUsuario, "5", true, false);
            getMenu(IndClasificacionRiesgo, oIsUsuario.CodUsuario, "6", true, false);

            getMenuAntalis(indAntalis, oIsUsuario.CodUsuario);

            get20CliMayMntPastDueCritico();

            Log oLog = new Log();

            oLog.IdUsuario = oIsUsuario.CodUsuario;
            oLog.ObsLog    = "TOP 20 CLIENTES CON MAYOR % MONTO PAST DUE CRITICO";
            oLog.CodEvtLog = "103";
            oLog.AppLog    = "TOP 20 CLIENTES CON MAYOR % MONTO PAST DUE CRITICO";
            oLog.putLog();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            oIsUsuario = oWeb.ValidaUserAppReport();

            getMenu(zone_dashboard, oIsUsuario.CodUsuario, "0", false, true);
            getMenu(idReportePago, oIsUsuario.CodUsuario, "1", true, false);
            getMenu(idProcesoSeguimiento, oIsUsuario.CodUsuario, "2", true, false);
            getMenu(idCartolas, oIsUsuario.CodUsuario, "3", true, false);
            getMenu(idProcesoNormalizacion, oIsUsuario.CodUsuario, "4", true, false);
            getMenu(idIndicadoresClaves, oIsUsuario.CodUsuario, "5", true, false);
            getMenu(IndClasificacionRiesgo, oIsUsuario.CodUsuario, "6", true, false);

            getMenuAntalis(indAntalis, oIsUsuario.CodUsuario);

            get50CliVentaPotencial();

            Log oLog = new Log();

            oLog.IdUsuario = oIsUsuario.CodUsuario;
            oLog.ObsLog    = "TOP 50 VENTA POTENCIAL";
            oLog.CodEvtLog = "108";
            oLog.AppLog    = "TOP 50 VENTA POTENCIAL";
            oLog.putLog();
        }
Exemplo n.º 29
0
 protected void Page_Load(object sender, EventArgs e)
 {
     oIsUsuario = oWeb.GetObjUsuario();
     putUserRanking();
 }
Exemplo n.º 30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            Response.Cache.SetExpires(DateTime.Now);
            Response.Cache.SetNoServerCaching();
            Response.Cache.SetNoStore();

            DBConn oConn = new DBConn();

            oIsUsuario = oWeb.ValidaUserAppReport();

            if (!IsPostBack)
            {
                bool bFromMenu = (!string.IsNullOrEmpty(oWeb.GetData("frommenu")) ? true : false);
                //idUser.Text = "¡Hola " + oIsUsuario.Nombres + "!";
                idUser.Text = "CUSTOMER PROFILE ";

                if (oConn.Open())
                {
                    if (bFromMenu)
                    {
                        hdd_cliente.Value = oWeb.GetData("nkey_cliente");
                        hdd_holding.Value = oWeb.GetData("ncodholding");

                        cDashboard oDeudor = new cDashboard(ref oConn);
                        if (!string.IsNullOrEmpty(hdd_cliente.Value))
                        {
                            oDeudor.nKeyCliente = hdd_cliente.Value;
                        }
                        if (!string.IsNullOrEmpty(hdd_holding.Value))
                        {
                            oDeudor.CodHolding = hdd_holding.Value;
                        }

                        if (!string.IsNullOrEmpty(oWeb.GetData("nkey_deudor")))
                        {
                            oDeudor.nKeyDeudor = oWeb.GetData("nkey_deudor");
                        }

                        DataTable dt = oDeudor.GetDeudores();
                        if (dt != null)
                        {
                            if (dt.Rows.Count > 0)
                            {
                                hdd_ncodigodeudor.Value = dt.Rows[0]["ncodigodeudor"].ToString() + " " + dt.Rows[0]["deudor"].ToString().Replace("'", "");
                            }
                        }
                        dt = null;

                        hdd_load_msj.Value = "1";
                    }
                    else
                    {
                        cDashboardKeys oDashboardKeys = new cDashboardKeys(ref oConn);
                        oDashboardKeys.CodUser = oIsUsuario.CodUsuario;
                        DataTable dt = oDashboardKeys.Get();
                        if (dt != null)
                        {
                            if (dt.Rows.Count > 0)
                            {
                                hdd_cliente.Value       = dt.Rows[0]["nkey_cliente"].ToString();
                                hdd_holding.Value       = dt.Rows[0]["ncodholding"].ToString();
                                hdd_ncodigodeudor.Value = dt.Rows[0]["ncodigodeudor"].ToString();

                                oIsUsuario.NKeyUsuario   = dt.Rows[0]["nkey_cliente"].ToString();
                                oIsUsuario.NCodHolding   = dt.Rows[0]["ncodholding"].ToString();
                                oIsUsuario.NCodigodeudor = dt.Rows[0]["ncodigodeudor"].ToString();
                                oIsUsuario.NKeyDeudor    = dt.Rows[0]["nkey_deudor"].ToString();

                                hdd_load_msj.Value = "1";
                            }
                        }
                        dt = null;
                    }
                }
                oConn.Close();
            }

            if (!string.IsNullOrEmpty(hdd_loadnewcondition.Value))
            {
                oIsUsuario.NKeyUsuario     = string.Empty;
                oIsUsuario.NCodHolding     = string.Empty;
                oIsUsuario.NKeyDeudor      = string.Empty;
                oIsUsuario.NCodigodeudor   = string.Empty;
                hdd_loadnewcondition.Value = "";
            }

            if (oConn.Open())
            {
                if (!string.IsNullOrEmpty(hdd_delete_widget.Value))
                {
                    cWidgets oWidgets = new cWidgets(ref oConn);
                    oWidgets.CodUser   = oIsUsuario.CodUsuario;
                    oWidgets.CodWidget = hdd_delete_widget.Value;
                    oWidgets.Accion    = "ELIMINAR";
                    oWidgets.Put();

                    if (!string.IsNullOrEmpty(oWidgets.Error))
                    {
                        Response.Write("Error de eliminación : " + oWidgets.Error);
                        Response.End();
                    }

                    hdd_delete_widget.Value = string.Empty;
                }

                bool       indOneHolding    = false;
                bool       indCmbHoldingAct = false;
                cDashboard oHC = new cDashboard(ref oConn);
                oHC.CodUsuario = oIsUsuario.CodUsuario;
                DataTable dtHolding = oHC.GetHolding();
                if (dtHolding != null)
                {
                    if (dtHolding.Rows.Count > 0)
                    {
                        if (dtHolding.Rows.Count > 1)
                        {
                            indCmbHoldingAct = true;
                            foreach (DataRow oRow in dtHolding.Rows)
                            {
                                idItemDropdownHolding.Controls.Add(new LiteralControl("<a class=\"dropdown-item item-holding\" href=\"#\"  data-value=\"" + oRow["ncodholding"].ToString() + "\">" + oRow["holding"].ToString().ToUpper() + "</a>"));
                            }
                        }
                        else
                        {
                            indOneHolding = true;
                        }
                    }
                    else
                    {
                        idCmbHolding.Visible = false;
                    }
                }


                bool      indOneCliente    = false;
                bool      indCmbClienteAct = false;
                DataTable dtClientes       = oHC.GetClientes();
                if (dtClientes != null)
                {
                    if (dtClientes.Rows.Count > 0)
                    {
                        if (dtClientes.Rows.Count > 1)
                        {
                            indCmbClienteAct = true;
                            foreach (DataRow oRow in dtClientes.Rows)
                            {
                                idItemDropdownCliente.Controls.Add(new LiteralControl("<a class=\"dropdown-item item-cliente\" href=\"#\"  data-value=\"" + oRow["nkey_cliente"].ToString() + "\">" + oRow["sNombre"].ToString().ToUpper() + "</a>"));
                            }
                        }
                        else
                        {
                            indOneCliente = true;
                        }
                    }
                    else
                    {
                        idCmbCliente.Visible = false;
                    }
                }

                if ((indOneHolding) && (!idCmbCliente.Visible))
                {
                    hdd_holding.Value    = dtHolding.Rows[0]["ncodholding"].ToString();
                    idCmbHolding.Visible = false;
                    hdd_load_msj.Value   = "1";
                }
                else
                {
                    if (!indCmbHoldingAct)
                    {
                        foreach (DataRow oRow in dtHolding.Rows)
                        {
                            idItemDropdownHolding.Controls.Add(new LiteralControl("<a class=\"dropdown-item item-holding\" href=\"#\"  data-value=\"" + oRow["ncodholding"].ToString() + "\">" + oRow["holding"].ToString().ToUpper() + "</a>"));
                        }
                    }
                }

                if ((indOneCliente) && (!idCmbHolding.Visible))
                {
                    hdd_cliente.Value    = dtClientes.Rows[0]["nkey_cliente"].ToString();
                    idCmbCliente.Visible = false;
                    hdd_load_msj.Value   = "1";
                }
                else
                {
                    if (!indCmbClienteAct)
                    {
                        foreach (DataRow oRow in dtClientes.Rows)
                        {
                            idItemDropdownCliente.Controls.Add(new LiteralControl("<a class=\"dropdown-item item-cliente\" href=\"#\"  data-value=\"" + oRow["nkey_cliente"].ToString() + "\">" + oRow["sNombre"].ToString().ToUpper() + "</a>"));
                        }
                    }
                }


                dtClientes = null;
                dtHolding  = null;
            }
            oConn.Close();

            if (string.IsNullOrEmpty(hdd_load_msj.Value))
            {
                hdd_load_msj.Value = "1";
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "openmodal", "$('#modalRelatedContent').modal('show');", true);
            }
            else
            {
                if ((!string.IsNullOrEmpty(hdd_cliente.Value)) || (!string.IsNullOrEmpty(hdd_holding.Value)))
                {
                    if (oConn.Open())
                    {
                        cDashboard oClienteHolding = new cDashboard(ref oConn);
                        oClienteHolding.nKeyCliente = hdd_cliente.Value;
                        oClienteHolding.CodHolding  = hdd_holding.Value;
                        DataTable dt = oClienteHolding.GetClienteHolding();
                        if (dt != null)
                        {
                            if (dt.Rows.Count > 0)
                            {
                                if (!string.IsNullOrEmpty(hdd_cliente.Value))
                                {
                                    dropdownholding.InnerText  = "HOLDING";
                                    dropdownempresas.InnerText = dt.Rows[0]["sNombre"].ToString().ToUpper();
                                    lblClienteHolding.Text     = "EMPRESA: " + dt.Rows[0]["sNombre"].ToString().ToUpper();
                                }
                                if (!string.IsNullOrEmpty(hdd_holding.Value))
                                {
                                    dropdownholding.InnerText  = dt.Rows[0]["holding"].ToString().ToUpper();
                                    dropdownempresas.InnerText = "EMPRESAS";
                                    lblClienteHolding.Text     = "HOLDING: " + dt.Rows[0]["holding"].ToString().ToUpper();
                                }
                            }
                        }
                        dt = null;
                    }
                    oConn.Close();
                }

                if ((!string.IsNullOrEmpty(hdd_ncodigodeudor.Value)) && (!string.IsNullOrEmpty(hdd_cliente.Value)) || (!string.IsNullOrEmpty(hdd_holding.Value)))
                {
                    if (oConn.Open())
                    {
                        cDashboard oDeudor = new cDashboard(ref oConn);
                        oDeudor.nKeyCliente = hdd_cliente.Value;
                        oDeudor.CodHolding  = hdd_holding.Value;
                        oDeudor.NomDeudor   = hdd_ncodigodeudor.Value;
                        //oDeudor.CodigoDeudor = hdd_ncodigodeudor.Value;
                        DataTable dt = oDeudor.GetDeudorByCodigo();
                        if (dt != null)
                        {
                            if (dt.Rows.Count > 0)
                            {
                                cDashboardKeys oDashboardKeys = new cDashboardKeys(ref oConn);
                                oDashboardKeys.CodUser = oIsUsuario.CodUsuario;
                                oDashboardKeys.Accion  = "ELIMINAR";
                                oDashboardKeys.Put();

                                if (!string.IsNullOrEmpty(hdd_cliente.Value))
                                {
                                    oDashboardKeys.KeyCliente = hdd_cliente.Value;
                                }

                                if (!string.IsNullOrEmpty(hdd_holding.Value))
                                {
                                    oDashboardKeys.CodHolding = hdd_holding.Value;
                                }

                                oDashboardKeys.CodigoDeudor = hdd_ncodigodeudor.Value;
                                oDashboardKeys.KeyDeudor    = dt.Rows[0]["nkey_deudor"].ToString();
                                oDashboardKeys.Accion       = "CREAR";
                                oDashboardKeys.Put();

                                oIsUsuario.NKeyUsuario   = hdd_cliente.Value;
                                oIsUsuario.NCodHolding   = hdd_holding.Value;
                                oIsUsuario.NCodigodeudor = hdd_ncodigodeudor.Value;
                                oIsUsuario.NKeyDeudor    = dt.Rows[0]["nkey_deudor"].ToString();

                                oIsUsuario.Moneda = oDeudor.getSimboloMoneda();

                                //lblDeudor.Text = "Estás en el CUSTOMER PROFILE " + dt.Rows[0]["deudor"].ToString() + " Cod. " + dt.Rows[0]["ncodigodeudor"].ToString();
                                lblDeudor.Text = (dt.Rows[0]["deudor"].ToString() + " Cod. " + dt.Rows[0]["ncodigodeudor"].ToString()).ToUpper();

                                Log oLog = new Log();
                                oLog.IdUsuario = oIsUsuario.CodUsuario;
                                oLog.ObsLog    = "CUSTOMER PROFILE " + dt.Rows[0]["deudor"].ToString() + " Cod. " + dt.Rows[0]["ncodigodeudor"].ToString();
                                oLog.CodEvtLog = "100";
                                oLog.AppLog    = "CUSTOMER PROFILE";
                                if (!string.IsNullOrEmpty(hdd_cliente.Value))
                                {
                                    oLog.NkeyCliente = hdd_cliente.Value;
                                }
                                if (!string.IsNullOrEmpty(hdd_holding.Value))
                                {
                                    oLog.NcodHolding = hdd_holding.Value;
                                }
                                oLog.NkeyDeudor = dt.Rows[0]["nkey_deudor"].ToString();
                                oLog.putLog();
                            }
                        }
                        dt = null;
                    }
                    oConn.Close();
                }
                else
                {
                    hdd_ncodigodeudor.Value = string.Empty;
                    lblDeudor.Text          = string.Empty;;
                }
            }

            getWidgetAvailable();

            DataTable dtWidget = null;

            if (oConn.Open())
            {
                cWidgets oWidgets = new cWidgets(ref oConn);
                oWidgets.CodUser = oIsUsuario.CodUsuario;
                dtWidget         = oWidgets.getWidgetsByUser();
            }
            oConn.Close();

            DrawDashboard(dtWidget);
        }