Example #1
0
        /// <summary>
        /// Redireccionar a la Pagina Web Correspondiente Según Perfil de Usuario, si
        /// se redirecciona a Xplora Maps, Actualizar Password o la Página Normal.
        /// </summary>
        /// <param name="paginaUrl"></param>
        private void fncRedireccionar(String paginaUrl)
        {
            EntrySeccion  oSeccion  = new EntrySeccion();
            EEntrySeccion oeSeccion = new EEntrySeccion();

            try{
                oeSeccion = oSeccion.PrimerAcceso(sUser);
                if (oSeccion.getMessages().Equals(""))
                {
                    if (oeSeccion.seccionname == "1")
                    {
                        Response.Redirect("Cambio_pswd.aspx", true);
                    }
                    //if (Request.Cookies["SIGE_URLRedirect"] == null)
                    //    this.Response.Redirect("~/" + sPagina, true);
                    else
                    {
                        //HttpCookie hcURLRedirect = Request.Cookies["SIGE_URLRedirect"];
                        // Xplora Maps Alicorp
                        if (this.Session["companyid"].ToString() == "1562" &&
                            (this.Session["Perfilid"].ToString() == "6001" ||
                             this.Session["Perfilid"].ToString() == "4512"))
                        {
                            Response.Redirect("http://sige.lucky.com.pe:8081/");
                        } // Xplora Maps Colgate
                        else if (this.Session["companyid"].ToString() == "1561" &&
                                 this.Session["Perfilid"].ToString() == "4512")
                        {
                            Response.Redirect("http://sige.lucky.com.pe:8282");
                        } // WebSite Operativo y Administrativo
                        else
                        {
                            //this.Response.Redirect("~/" + sPagina, true);
                            this.Response.Redirect("~/" + paginaUrl, true);
                        }
                    }
                }
                else
                {
                    messages = "Error: " + oSeccion.getMessages();
                }
            }catch (Exception ex) {
                messages = "Error: " + ex.Message.ToString();
            }
        }