コード例 #1
0
    protected void cargarDatosHistorial(string idUsuario)
    {
        LHistorial lHistorial = new LHistorial();

        GV_Historial.DataSource = lHistorial.obtenerHistorial(idUsuario);
        GV_Historial.DataBind();
    }
コード例 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetCacheability(HttpCacheability.ServerAndNoCache);
        Response.Cache.SetAllowResponseInBrowserHistory(false);
        Response.Cache.SetNoStore();

        Int32   FORMULARIO = 1;
        LIdioma idioma     = new LIdioma();
        UIdioma com        = new UIdioma();
        Int32   DDL;

        try
        {
            DDL = int.Parse(Session["ddl"].ToString());
        }
        catch
        {
            DDL = 1;
        }

        DataTable info       = idioma.obtenerControl(FORMULARIO, DDL);
        Hashtable compIdioma = new Hashtable();

        Session["mensajes"] = compIdioma;
        compIdioma          = idioma.hastableIdioma(info, compIdioma);
        L_PuntosR.Text      = compIdioma["L_PuntosR"].ToString();
        L_cantPuntos.Text   = compIdioma["L_cantPuntos"].ToString();
        L_puntosInsu.Text   = compIdioma["L_puntosInsu"].ToString();
        L_Historial.Text    = compIdioma["L_Historial"].ToString();
        BT_Regresar.Text    = compIdioma["BT_Regresar"].ToString();
        GV_Historial.Columns[0].HeaderText = compIdioma["LB_Mesa"].ToString();
        GV_Historial.Columns[1].HeaderText = compIdioma["LB_Dia"].ToString();
        DL_canje.DataBind();
        Session["men"] = compIdioma["JS_canje"].ToString();

        int            Id         = int.Parse(Session["user_id"].ToString());
        LUser          dao        = new LUser();
        DataTable      tabla      = new DataTable();
        L_Persistencia data       = new L_Persistencia();
        int            id_usuario = int.Parse(Session["user_id"].ToString());

        GV_Historial.DataSource = data.listadeReservas(id_usuario);
        GV_Historial.DataBind();

        DataTable inter = data.ToDataTable(data.listadePuntos(Id));
        //tabla = data.listadePuntos(Id);
        UuserReservas dato = dao.canje(inter);

        LB_puntos.Text       = inter.Rows[0]["puntos"].ToString();
        L_puntosInsu.Visible = dato.Est1;
        DL_canje.Visible     = dato.Est2;
    }
コード例 #3
0
    protected async void Page_Load(object sender, EventArgs e)
    {
        UEncapUsuario user       = JsonConvert.DeserializeObject <UEncapUsuario>(Request.Cookies["cookie"].Value);
        string        url        = "http://18.224.240.8/api/Admin/ConsultVentas";
        var           HttpClient = new HttpClient();

        HttpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", user.Token);
        var json = await HttpClient.GetStringAsync(url);

        List <UEncapPedido> lista = JsonConvert.DeserializeObject <List <UEncapPedido> >(json);

        GV_Historial.DataSource = lista;
        GV_Historial.DataBind();
    }