Exemplo n.º 1
0
        /// <summary>
        /// Retorna la Pagina a la que debe ser redireccionado el usuario despues de loguearse.
        /// </summary>
        private String fncGetDataAplicationWeb()
        {
            String pagina = "";

            EAplicacionWeb oeAplicacionWeb = new EAplicacionWeb();
            AplicacionWeb  oAplicacionWeb  = new AplicacionWeb();

            try
            {
                oeAplicacionWeb = oAplicacionWeb.obtenerAplicacion(this.Session["scountry"].ToString(), this.Session["smodul"].ToString());
                // Verifica que no haya Errores
                if (oAplicacionWeb.getMessage().Equals(""))
                {
                    this.Session["oeAplicacionWeb"] = oeAplicacionWeb;
                    this.Session["cod_applucky"]    = oeAplicacionWeb.codapplucky;
                    this.Session["abr_app"]         = oeAplicacionWeb.abrapp;
                    this.Session["app_url"]         = oeAplicacionWeb.appurl;

                    pagina = oeAplicacionWeb.HomePage;

                    //oeUsuarioAcceso = null;
                    //oeAplicacionWeb = null;
                    //oAplicacionWeb = null;
                }
                else
                {
                    messages = "Error: " + oAplicacionWeb.getMessage();
                }
            }
            catch (Exception ex) {
                messages = "Error: " + ex.Message.ToString();
            }

            return(pagina);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Evento Go Click
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void GO_Click(object sender, EventArgs e)
        {
            /// Si los Control cmbselModulos y cmbcliente son diferente de 0
            if (cmbselModulos.Text != "0" && cmbcliente.Text != "0")
            {
                // Instanciando el BusinessLogic para obtener la información del App
                AplicacionWeb oAplicacionWeb = new AplicacionWeb();

                // Obteniendo información de la Aplicación
                EAplicacionWeb oeAplicacionWeb =
                    oAplicacionWeb.obtenerAplicacion(
                        this.Session["scountry"].ToString().Trim(),
                        cmbselModulos.SelectedItem.Value);

                // Verificar que no haya Errores
                if (oAplicacionWeb.getMessage().Equals(""))
                {
                    this.Session["oeAplicacionWeb"] = oeAplicacionWeb;
                    this.Session["cod_applucky"]    = oeAplicacionWeb.codapplucky;
                    this.Session["abr_app"]         = oeAplicacionWeb.abrapp;
                    this.Session["app_url"]         = oeAplicacionWeb.appurl;
                    this.Session["companyid"]       = cmbcliente.SelectedItem.Value;
                    DataTable dturllogo =
                        oCoon.ejecutarDataTable("UP_WEBXPLORA_GEN_LOGOCLIENT",
                                                Convert.ToInt32(cmbcliente.Text));
                    this.Session["fotocomany"] = dturllogo.Rows[0][0].ToString().Trim();
                    this.Session["sNombre"]    = cmbcliente.SelectedItem.Text;
                    string sPagina = oeAplicacionWeb.HomePage;
                    oeAplicacionWeb = null;
                    oAplicacionWeb  = null;
                    this.Response.Redirect("~/" + sPagina, true);
                    //if (this.Session["scountry"].ToString() == "589" && cmbselModulos.SelectedItem.Value == "MOVIL")
                    //{
                    //Response.Redirect("http://localhost:61260/?data=" + Lucky.CFG.Util.Encriptacion.QueryStringEncode(this.Session["sUser"].ToString() + "/" + this.Session["companyid"].ToString() + "/" + this.Session["sNombre"].ToString(), "usr"));

                    //    //Response.Redirect("http://localhost:61260 <http://localhost:61260/> ", true);
                    //}
                    //else
                    //{
                    //    this.Response.Redirect("~/" + sPagina, true);
                    //}
                }
                else
                {
                    Alertas.CssClass  = "MensajesSupervisor";
                    LblAlert.Text     = "Error:";
                    LblFaltantes.Text = "Sr. Usuario, ocurrió un error inesperado: "
                                        + oAplicacionWeb.getMessage();
                    ModalPopupAlertas.Show();
                    return;
                }
            }
        }