Example #1
0
    protected void DropDownList4_SelectedIndexChanged(object sender, EventArgs e)
    {
        Session["perfil"] = DDL_perfil.SelectedValue;

        L_MasterAdmin Uperfil = new L_MasterAdmin();
        U_usuarios    ms2     = new U_usuarios();

        ms2 = Uperfil.perfil(int.Parse(DDL_perfil.SelectedValue), Session.SessionID, Int32.Parse(Session["id_usuaro"].ToString()));

        Session["id_usuaro"] = ms2.Sesion1;
        //Session["nombre"] = ms.Nombre1;
        Response.Redirect(ms2.Url);



        /*
         * int n = 0;
         *
         * do
         * {
         *
         *    Session["perfil"] = DDL_perfil.SelectedValue;
         *
         *    switch (int.Parse(DDL_perfil.SelectedValue))
         *    {
         *        case 1:
         *
         *            Response.Redirect("Editar_Administrador.aspx");
         *            break;
         *        case 2:
         *
         *            Response.Redirect("ver_pqr.aspx");
         *            break;
         *
         *
         *        case 3:
         *            Session["user_id"] = null;
         *            Session["nombre"] = null;
         *
         *           Dao_Usuario user = new Dao_Usuario();
         *           E_Usuario datos = new E_Usuario();
         *           datos.Session = Session.SessionID;
         *           user.cerrarSession(datos);
         *           Response.Redirect("productos.aspx");
         *            break;
         *
         *    }
         *
         * } while (n < 0);
         */
    }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetCacheability(HttpCacheability.ServerAndNoCache);
        L_MasterAdmin    logica   = new L_MasterAdmin();
        U_AuxMasterAdmin response = logica.page_load(Session["sesion"]);

        Numero_noti.Text        = response.Numero_noti1;
        cantidadAceptadas.Text  = response.CantidadAceptadas;
        cantidadRechazadas.Text = response.CantidadRechazadas;
        cantidadPendientes.Text = response.CantidadPendientes;
        TotalAceptadas.Text     = response.TotalAceptadas1;
        TotalRechazadas.Text    = response.TotalRechazadas1;
        TotalPendientes.Text    = response.TotalPendientes1;
        TotalSolicitudes.Text   = response.TotalSolicitudes1;
        FotoPerfil.ImageUrl     = response.FotoPerfil1;
        FotoPerfil2.ImageUrl    = response.FotoPerfil1;
        NombrePerfil.Text       = response.NombrePerfil1;
        NombrePerfil2.Text      = response.NombrePerfil21;

        //Seteando Idiomas
        L_Idioma  idiot      = new L_Idioma();
        Object    sesidioma  = Session["idiomases"];
        Int32     formulario = 25;
        Int32     idiom      = Convert.ToInt32(sesidioma);
        Hashtable compIdioma = new Hashtable();

        idiot.mostraridioma(formulario, idiom, compIdioma);
        try
        {
            this.title.Text              = compIdioma["title"].ToString();
            this.adm.InnerText           = compIdioma["adm"].ToString();
            this.solic.InnerText         = compIdioma["solic"].ToString();
            this.emp_acept.InnerText     = compIdioma["emp_acept"].ToString();
            this.emp_rech.InnerText      = compIdioma["emp_rech"].ToString();
            this.emp_pend.InnerText      = compIdioma["emp_pend"].ToString();
            this.rep_cry.InnerHtml       = "<span></span>" + compIdioma["rep_cry"].ToString();
            this.Salir.Text              = compIdioma["Salir"].ToString();
            this.contr.InnerText         = compIdioma["contr"].ToString();
            this.navigate_menu.InnerText = compIdioma["navigate_menu"].ToString();
            this.main.InnerText          = compIdioma["main"].ToString();
            this.quej.InnerText          = compIdioma["quej"].ToString();
            this.repor.InnerText         = compIdioma["repor"].ToString();
            this.usr.InnerHtml           = compIdioma["usr"].ToString() + "<span class='label label-theme m-l-5'></span>";
            this.cliet.InnerHtml         = "<b class='caret pull-right'></b>" + compIdioma["cliet"].ToString();
            this.ver_all.InnerText       = compIdioma["ver_all"].ToString();
            this.empre.InnerHtml         = "<b class='caret pull-right'></b>" + compIdioma["empre"].ToString();
            this.ver_all2.InnerText      = compIdioma["ver_all"].ToString();
            this.tot_vent.InnerText      = compIdioma["tot_vent"].ToString();
            this.request.InnerText       = compIdioma["request"].ToString();
            this.accep.InnerText         = compIdioma["accep"].ToString();
            this.rech.InnerText          = compIdioma["rech"].ToString();
            this.pend.InnerText          = compIdioma["pend"].ToString();
            this.admi_cat.InnerText      = compIdioma["admi_cat"].ToString();
            this.adm_mem.InnerText       = compIdioma["adm_mem"].ToString();
            this.adm_mot.InnerText       = compIdioma["adm_mot"].ToString();
            this.Span1.InnerText         = compIdioma["Span1"].ToString();
        }
        catch (Exception ex)
        { }
        Page.ClientScript.RegisterStartupScript(this.GetType(), "Script", "redireccionar('" + response.Redireccion + "');", true);
    }