Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        L_Home logi = new L_Home();

        Session["idiomases"] = int.Parse(logi.validar_ses_idioma(Session["idiomases"]).ToString());
        Session["global"]    = logi.validar_region(Session["global"]).ToString();
        //Seteando Idiomas
        L_Idioma  idiot      = new L_Idioma();
        Object    sesidioma  = Session["idiomases"];
        Int32     formulario = 24;
        Int32     idiom      = Convert.ToInt32(sesidioma);
        Hashtable compIdioma = new Hashtable();

        idiot.mostraridioma(formulario, idiom, compIdioma);
        Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture(Session["global"].ToString());
        Thread.CurrentThread.CurrentUICulture = new CultureInfo(Session["global"].ToString());
        try
        {
            this.BTN_Idioma.Text = compIdioma["BTN_Idioma"].ToString();
            this.LB_head.Text    = compIdioma["LB_head"].ToString();
            this.BTN_Acep.Text   = compIdioma["BTN_Acep"].ToString();
            this.BTN_Can.Text    = compIdioma["BTN_Can"].ToString();
        }
        catch (Exception ex)
        { }
    }
Пример #2
0
    public static string get_idSession()
    {
        if (HttpContext.Current.Session["Sesion"] != null)
        {
            //REPORTAMOS LA SESION ACTIVA
            L_Home    logi = new L_Home();
            DataTable sess = (DataTable)HttpContext.Current.Session["Sesion"];
            if (((int)sess.Rows[0]["idTipo"] == 1) || ((int)sess.Rows[0]["idTipo"] == 3))
            {
                //LLAMAR AL METODO DEL USUARIO
                logi.reportar_sesion_user(HttpContext.Current.Session.SessionID, (int)sess.Rows[0]["idUsuario"]);
            }
            return("Sesion Activa");
        }
        else
        {
            //NO HAY SESSION NO HACER REPORTE
        }
        String data = HttpContext.Current.Session.SessionID;

        return(data);
    }