예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetCacheability(HttpCacheability.ServerAndNoCache);
        L_PrinciAdmin   logica = new L_PrinciAdmin();
        UAuxPrinciAdmin res    = logica.page_load(Session["sesion"]);

        L_Usuarios.Text    = res.L_Usuarios1;
        L_Empresas.Text    = res.L_Empresas1;
        L_totalVentas.Text = res.L_totalVentas1;
        L_Pqr.Text         = res.L_Pqr1;

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

        idiot.mostraridioma(formulario, idiom, compIdioma);
        try
        {
            this.welco.InnerText      = compIdioma["welco"].ToString();
            this.main.InnerHtml       = compIdioma["main"].ToString() + " <small id='comp' runat='server'>" + compIdioma["comp"].ToString() + "</small>";
            this.ven.InnerText        = compIdioma["ven"].ToString();
            this.ven_his.InnerText    = compIdioma["ven_his"].ToString();
            this.emp_reg.InnerText    = compIdioma["emp_reg"].ToString();
            this.act_emp.InnerText    = compIdioma["act_emp"].ToString();
            this.client_reg.InnerText = compIdioma["client_reg"].ToString();
            this.usr_act.InnerText    = compIdioma["usr_act"].ToString();
            this.pqr_se.InnerText     = compIdioma["pqr_se"].ToString();
            this.L_texto.Text         = compIdioma["L_texto"].ToString();

            //this.bloq_perfi.InnerText = compIdioma["bloq_perfi"].ToString();
        }
        catch (Exception ex)
        {
        }
        Page.ClientScript.RegisterStartupScript(this.GetType(), "Script", "redireccionar('" + res.Redireccion + "');", true);
    }
예제 #2
0
        public UAuxPrinciAdmin page_load(Object Session)
        {
            UAuxPrinciAdmin respo = new UAuxPrinciAdmin();

            if (Session == null)
            {
                respo.Redireccion = "LoginUsr.aspx";
                //Response.Redirect("LoginUsr.aspx");
            }
            else
            {
                if (int.Parse(((DataTable)(Session)).Rows[0]["idTipo"].ToString()) == 1)
                {
                    int num = int.Parse(((DataTable)(Session)).Rows[0]["idTipo"].ToString());
                    //LLAMAMOS A LA NUEVA DB
                    DB_Admin daoAdm       = new DB_Admin();
                    int      totalcliente = daoAdm.tot_clients();
                    int      totalEmpresa = daoAdm.total_empr();
                    double   totalVentas  = daoAdm.tot_ventas();
                    int      not          = daoAdm.llenar_notificacion();
                    int      notAcep      = daoAdm.llenar_notificacionAccept();
                    int      notRecha     = daoAdm.llenar_notificacionRechaz();
                    respo.Redireccion    = "0";
                    respo.L_Usuarios1    = totalcliente.ToString();
                    respo.L_Empresas1    = totalEmpresa.ToString();
                    respo.L_totalVentas1 = totalVentas.ToString("C");
                    respo.L_Pqr1         = (notAcep + notRecha + not).ToString();
                }

                else
                {
                    respo.Redireccion = "LoginUsr.aspx";
                    //Response.Redirect("LoginUsr.aspx");
                }
            }
            return(respo);
        }