protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetCacheability(HttpCacheability.ServerAndNoCache);
        Response.Cache.SetAllowResponseInBrowserHistory(false);
        Response.Cache.SetNoStore();

        LUser dato = new LUser();

        GV_Platos.DataSource = dato.listarmenu();
        GV_Platos.DataBind();
    }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetCacheability(HttpCacheability.ServerAndNoCache);
        Response.Cache.SetAllowResponseInBrowserHistory(false);
        Response.Cache.SetNoStore();

        Int32   FORMULARIO = 10;
        LIdioma idioma     = new LIdioma();
        UIdioma com        = new UIdioma();


        try
        {
            int DDL = int.Parse(Session["ddl"].ToString());
            com = idioma.idiomaListaplatos(FORMULARIO, DDL);
        }
        catch
        {
            int DDL = 1;
            com = idioma.idiomaListaplatos(FORMULARIO, DDL);
        }

        Hashtable compIdioma = new Hashtable();

        Session["mensajes"] = compIdioma;

        //for (int i = 0; i < info.Rows.Count; i++)
        //{
        //    compIdioma.Add(info.Rows[i]["control"].ToString(), info.Rows[i]["valor"].ToString());
        //}
        LB_listPlato.Text               = com.A;
        BT_Nuevo.Text                   = com.B;
        B_modificar.Text                = com.C;
        BT_Eliminar.Text                = com.D;
        LB_buscar.Text                  = com.E;
        BT_Buscar.Text                  = com.F;
        RFV_alerta.Text                 = com.G;
        validator_username.Text         = com.H;
        GV_Platos.Columns[0].HeaderText = com.I;
        GV_Platos.Columns[2].HeaderText = com.J;
        GV_Platos.Columns[3].HeaderText = com.K;
        GV_Platos.Columns[4].HeaderText = com.L;
        GV_Platos.Columns[5].HeaderText = com.M;
        Session["men"]                  = com.N;
        Session["buscarp"]              = com.O;



        L_Persistencia dato = new L_Persistencia();

        GV_Platos.DataSource = dato.obtenerMenu();
        GV_Platos.DataBind();
    }
    protected void TB_Filtro_TextChanged(object sender, EventArgs e)
    {
        LUser dato             = new LUser();
        UUser datos            = new UUser();
        ClientScriptManager cm = this.ClientScript;
        String nombre          = TB_Filtro.Text.ToString();
        // datos.Nombre = nombre;
        DataTable validez = dato.validarbuscarM(nombre);

        datos.X = int.Parse(validez.Rows[0]["id_plato"].ToString());
        GV_Platos.DataSource = dato.buscarPla((TB_Filtro.Text.ToString()));
        GV_Platos.DataBind();
    }
Example #4
0
    protected void TB_Filtro_TextChanged(object sender, EventArgs e)
    {
        L_Persistencia      dato   = new L_Persistencia();
        UUser               datos  = new UUser();
        ClientScriptManager cm     = this.ClientScript;
        String              nombre = TB_Filtro.Text.ToString();

        // datos.Nombre = nombre;
        try
        {
            DataTable validez = dato.ToDataTable(dato.buscarPlatos(nombre));

            datos.X = int.Parse(validez.Rows[0]["id_plato"].ToString());
            GV_Platos.DataSource = dato.buscarPlatos((TB_Filtro.Text.ToString()));
            GV_Platos.DataBind();
        }
        catch
        {
            this.RegisterStartupScript("mensaje", "<script type='text/javascript'>alert('" + Session["buscarp"].ToString() + "');window.location=\"ListadePlatos.aspx\"</script>");
        }
    }